@techdocs/cli 0.8.15 → 0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/{generate-86756c8c.cjs.js → generate-20171bf9.cjs.js} +6 -2
- package/dist/cjs/generate-20171bf9.cjs.js.map +1 -0
- package/dist/embedded-app/.config-schema.json +1 -1
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1553.3f1fcd49.chunk.js → 1553.8d50cd6e.chunk.js} +2 -2
- package/dist/embedded-app/static/{1553.3f1fcd49.chunk.js.map → 1553.8d50cd6e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1959.657c7008.chunk.js → 1959.3c856a1e.chunk.js} +2 -2
- package/dist/embedded-app/static/{1959.657c7008.chunk.js.map → 1959.3c856a1e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2426.82184352.chunk.js → 2426.0fc592b4.chunk.js} +2 -2
- package/dist/embedded-app/static/{2426.82184352.chunk.js.map → 2426.0fc592b4.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{390.9bae5f6b.chunk.js → 390.879c2086.chunk.js} +2 -2
- package/dist/embedded-app/static/{390.9bae5f6b.chunk.js.map → 390.879c2086.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4022.919281f3.chunk.js → 4022.0fe21618.chunk.js} +2 -2
- package/dist/embedded-app/static/{4022.919281f3.chunk.js.map → 4022.0fe21618.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6105.1f3a3239.chunk.js → 6105.6eda23ad.chunk.js} +1 -1
- package/dist/embedded-app/static/{6105.1f3a3239.chunk.js.map → 6105.6eda23ad.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6235.d2d64119.chunk.js → 6235.c0346cdc.chunk.js} +2 -2
- package/dist/embedded-app/static/{6235.d2d64119.chunk.js.map → 6235.c0346cdc.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6583.ad8c5d41.chunk.js +3 -0
- package/dist/embedded-app/static/6583.ad8c5d41.chunk.js.map +1 -0
- package/dist/embedded-app/static/7110.5f7b5114.chunk.js +3 -0
- package/dist/embedded-app/static/7110.5f7b5114.chunk.js.map +1 -0
- package/dist/embedded-app/static/7758.2fe27149.chunk.js +3 -0
- package/dist/embedded-app/static/{7758.5616a290.chunk.js.map → 7758.2fe27149.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8061.4cacfdc7.chunk.js → 8061.8b41800d.chunk.js} +2 -2
- package/dist/embedded-app/static/{8061.4cacfdc7.chunk.js.map → 8061.8b41800d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8718.cb2cefe2.chunk.js → 8718.8a863f87.chunk.js} +1 -1
- package/dist/embedded-app/static/{8718.cb2cefe2.chunk.js.map → 8718.8a863f87.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8792.f347f8eb.chunk.js → 8792.c72ab612.chunk.js} +2 -2
- package/dist/embedded-app/static/{8792.f347f8eb.chunk.js.map → 8792.c72ab612.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9028.e0a4340b.chunk.js → 9028.decd1f17.chunk.js} +2 -2
- package/dist/embedded-app/static/{9028.e0a4340b.chunk.js.map → 9028.decd1f17.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.a73a2a40.js +444 -0
- package/dist/embedded-app/static/main.a73a2a40.js.map +1 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js +25 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.c0e7547f.js → module-material-ui.3c0e2d92.js} +6 -6
- package/dist/embedded-app/static/{module-material-ui.c0e7547f.js.map → module-material-ui.3c0e2d92.js.map} +1 -1
- package/dist/embedded-app/static/{module-react-beautiful-dnd.bcb66a0c.js → module-react-beautiful-dnd.2ab2ffc2.js} +2 -2
- package/dist/embedded-app/static/{module-react-beautiful-dnd.bcb66a0c.js.map → module-react-beautiful-dnd.2ab2ffc2.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.287af9cc.js → runtime.a73a2a40.js} +2 -2
- package/dist/embedded-app/static/runtime.a73a2a40.js.map +1 -0
- package/dist/embedded-app/static/vendor.a73a2a40.js +140 -0
- package/dist/embedded-app/static/vendor.a73a2a40.js.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/package.json +7 -7
- package/dist/cjs/generate-86756c8c.cjs.js.map +0 -1
- package/dist/embedded-app/static/6583.fc990b80.chunk.js +0 -3
- package/dist/embedded-app/static/6583.fc990b80.chunk.js.map +0 -1
- package/dist/embedded-app/static/7758.5616a290.chunk.js +0 -3
- package/dist/embedded-app/static/main.287af9cc.js +0 -415
- package/dist/embedded-app/static/main.287af9cc.js.map +0 -1
- package/dist/embedded-app/static/module-react-dom.40a0584f.js +0 -18
- package/dist/embedded-app/static/module-react-dom.40a0584f.js.map +0 -1
- package/dist/embedded-app/static/runtime.287af9cc.js.map +0 -1
- package/dist/embedded-app/static/vendor.287af9cc.js +0 -147
- package/dist/embedded-app/static/vendor.287af9cc.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 0.8.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 853efd42bd: Bump `@backstage/techdocs-common` to `0.11.10` to use `spotify/techdocs:v0.3.7` which upgrades `mkdocs-theme` as a dependency of `mkdocs-techdocs-core`.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-model@0.12.0
|
|
10
|
+
- @backstage/backend-common@0.12.0
|
|
11
|
+
- @backstage/techdocs-common@0.11.11
|
|
12
|
+
|
|
3
13
|
## 0.8.15
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -19,6 +19,7 @@ async function generate(cmd) {
|
|
|
19
19
|
const logger = utility.createLogger({ verbose: cmd.verbose });
|
|
20
20
|
const sourceDir = path.resolve(cmd.sourceDir);
|
|
21
21
|
const outputDir = path.resolve(cmd.outputDir);
|
|
22
|
+
const omitTechdocsCorePlugin = cmd.omitTechdocsCoreMkdocsPlugin;
|
|
22
23
|
const dockerImage = cmd.dockerImage;
|
|
23
24
|
const pullImage = cmd.pull;
|
|
24
25
|
logger.info(`Using source dir ${sourceDir}`);
|
|
@@ -30,7 +31,10 @@ async function generate(cmd) {
|
|
|
30
31
|
generator: {
|
|
31
32
|
runIn: cmd.docker ? "docker" : "local",
|
|
32
33
|
dockerImage,
|
|
33
|
-
pullImage
|
|
34
|
+
pullImage,
|
|
35
|
+
mkdocs: {
|
|
36
|
+
omitTechdocsCorePlugin
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
});
|
|
@@ -63,4 +67,4 @@ async function generate(cmd) {
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
exports["default"] = generate;
|
|
66
|
-
//# sourceMappingURL=generate-
|
|
70
|
+
//# sourceMappingURL=generate-20171bf9.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-20171bf9.cjs.js","sources":["../../src/commands/generate/generate.ts"],"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 { resolve } from 'path';\nimport { Command } from 'commander';\nimport fs from 'fs-extra';\nimport Docker from 'dockerode';\nimport {\n TechdocsGenerator,\n ParsedLocationAnnotation,\n} from '@backstage/techdocs-common';\nimport { DockerContainerRunner } from '@backstage/backend-common';\nimport { ConfigReader } from '@backstage/config';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n} from '../../lib/utility';\nimport { stdout } from 'process';\n\nexport default async function generate(cmd: Command) {\n // Use techdocs-common package to generate docs. Keep consistency between Backstage and CI generating docs.\n // Docs can be prepared using actions/checkout or git clone, or similar paradigms on CI. The TechDocs CI workflow\n // will run on the CI pipeline containing the documentation files.\n\n const logger = createLogger({ verbose: cmd.verbose });\n\n const sourceDir = resolve(cmd.sourceDir);\n const outputDir = resolve(cmd.outputDir);\n const omitTechdocsCorePlugin = cmd.omitTechdocsCoreMkdocsPlugin;\n const dockerImage = cmd.dockerImage;\n const pullImage = cmd.pull;\n\n logger.info(`Using source dir ${sourceDir}`);\n logger.info(`Will output generated files in ${outputDir}`);\n\n logger.verbose('Creating output directory if it does not exist.');\n\n await fs.ensureDir(outputDir);\n\n const config = new ConfigReader({\n techdocs: {\n generator: {\n runIn: cmd.docker ? 'docker' : 'local',\n dockerImage,\n pullImage,\n mkdocs: {\n omitTechdocsCorePlugin,\n },\n },\n },\n });\n\n // Docker client (conditionally) used by the generators, based on techdocs.generators config.\n const dockerClient = new Docker();\n const containerRunner = new DockerContainerRunner({ dockerClient });\n\n let parsedLocationAnnotation = {} as ParsedLocationAnnotation;\n if (cmd.techdocsRef) {\n try {\n parsedLocationAnnotation = convertTechDocsRefToLocationAnnotation(\n cmd.techdocsRef,\n );\n } catch (err) {\n logger.error(err.message);\n }\n }\n\n // Generate docs using @backstage/techdocs-common\n const techdocsGenerator = await TechdocsGenerator.fromConfig(config, {\n logger,\n containerRunner,\n });\n\n logger.info('Generating documentation...');\n\n await techdocsGenerator.run({\n inputDir: sourceDir,\n outputDir,\n ...(cmd.techdocsRef\n ? {\n parsedLocationAnnotation,\n }\n : {}),\n logger,\n etag: cmd.etag,\n ...(process.env.LOG_LEVEL === 'debug' ? { logStream: stdout } : {}),\n });\n\n logger.info('Done!');\n}\n"],"names":["createLogger","resolve","fs","config","ConfigReader","Docker","DockerContainerRunner","convertTechDocsRefToLocationAnnotation","TechdocsGenerator","stdout"],"mappings":";;;;;;;;;;;;;;;;;wBAgCuC,KAAc;AAKnD,QAAM,SAASA,qBAAa,EAAE,SAAS,IAAI;AAE3C,QAAM,YAAYC,aAAQ,IAAI;AAC9B,QAAM,YAAYA,aAAQ,IAAI;AAC9B,QAAM,yBAAyB,IAAI;AACnC,QAAM,cAAc,IAAI;AACxB,QAAM,YAAY,IAAI;AAEtB,SAAO,KAAK,oBAAoB;AAChC,SAAO,KAAK,kCAAkC;AAE9C,SAAO,QAAQ;AAEf,QAAMC,uBAAG,UAAU;AAEnB,QAAMC,WAAS,IAAIC,oBAAa;AAAA,IAC9B,UAAU;AAAA,MACR,WAAW;AAAA,QACT,OAAO,IAAI,SAAS,WAAW;AAAA,QAC/B;AAAA,QACA;AAAA,QACA,QAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA;AAOR,QAAM,eAAe,IAAIC;AACzB,QAAM,kBAAkB,IAAIC,oCAAsB,EAAE;AAEpD,MAAI,2BAA2B;AAC/B,MAAI,IAAI,aAAa;AACnB,QAAI;AACF,iCAA2BC,+CACzB,IAAI;AAAA,aAEC,KAAP;AACA,aAAO,MAAM,IAAI;AAAA;AAAA;AAKrB,QAAM,oBAAoB,MAAMC,iCAAkB,WAAWL,UAAQ;AAAA,IACnE;AAAA,IACA;AAAA;AAGF,SAAO,KAAK;AAEZ,QAAM,kBAAkB,IAAI;AAAA,IAC1B,UAAU;AAAA,IACV;AAAA,OACI,IAAI,cACJ;AAAA,MACE;AAAA,QAEF;AAAA,IACJ;AAAA,IACA,MAAM,IAAI;AAAA,OACN,QAAQ,IAAI,cAAc,UAAU,EAAE,WAAWM,qBAAW;AAAA;AAGlE,SAAO,KAAK;AAAA;;;;"}
|
|
@@ -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.
|
|
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.a73a2a40.js"></script><script defer="defer" src="/static/module-material-ui.3c0e2d92.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.ed51f4b8.js"></script><script defer="defer" src="/static/module-material-table.a73fb7f5.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.2ab2ffc2.js"></script><script defer="defer" src="/static/vendor.a73a2a40.js"></script><script defer="defer" src="/static/main.a73a2a40.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
|
-
"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(
|
|
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(29663),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.
|
|
3
|
+
//# sourceMappingURL=1553.8d50cd6e.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,6B,ufCed,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/1553.
|
|
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,6B,ufCed,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/1553.8d50cd6e.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,8 +1,8 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1959],{52160:function(Z,m,n){var v,d=n(14859),e=n(93291);v={value:!0},m.Z=void 0;var h=e(n(2784)),f=d(n(50175)),y=(0,f.default)(h.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");m.Z=y},81959:function(Z,m,n){n.r(m),n.d(m,{EntityLinksCard:function(){return D}});var v=n(
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1959],{52160:function(Z,m,n){var v,d=n(14859),e=n(93291);v={value:!0},m.Z=void 0;var h=e(n(2784)),f=d(n(50175)),y=(0,f.default)(h.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");m.Z=y},81959:function(Z,m,n){n.r(m),n.d(m,{EntityLinksCard:function(){return D}});var v=n(29663),d=n(52160),e=n(2784),h=n(79692),f=n(90436),y=n(77277),E=n(9118);const L=`metadata:
|
|
2
2
|
name: example
|
|
3
3
|
links:
|
|
4
4
|
- url: https://dashboard.example.com
|
|
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.
|
|
8
|
+
//# sourceMappingURL=1959.3c856a1e.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,OAEjC,EAA0B,EAAQ,OAEtC,EAA6C,CAC3C,MAAO,IAET,EAAQ,EAAU,OAElB,GAAI,GAAQ,EAAwB,EAAQ,OAExC,EAAiB,EAAuB,EAAQ,QAEhD,EAAY,GAAG,EAAe,SAAuB,EAAM,cAAc,OAAQ,CACnF,EAAG,8yBACD,YAEJ,EAAQ,EAAU,G,0JCElB,KAAM,GAAc;AAAA;AAAA;AAAA;AAAA;AAAA,uBAUd,EAAY,QAChB,GAAU,EACR,KAAM,CACJ,aAAc,EACd,OAAQ,GAAG,EAAM,QAAQ,WACzB,WAAY,EAAM,QAAQ,OAAS,OAAS,OAAS,UAGzD,CAAE,KAAM,uCAGH,YAAiC,CACtC,KAAM,GAAU,IAEhB,MACE,iBAAoB,WAAgB,KAChC,gBAAoB,IAAY,CAAE,QAAS,SAAW,sHAItD,gBAAoB,MAAO,CAAE,UAAW,EAAQ,MAC9C,gBAAoB,cAAa,CACjC,KAAM,EACN,SAAU,OACV,gBAAiB,GACjB,mBAAoB,CAAC,EAAG,EAAG,EAAG,GAC9B,YAAa,CAAE,WAAY,UAAW,SAAU,WAGlD,gBAAoB,IAAQ,CAC5B,QAAS,YACT,MAAO,UACP,OAAQ,SACR,KAAM,wFACN,c,qCC3CR,KAAM,GAAY,QAAW,CAC3B,QAAS,CACP,QAAS,eACT,QAAS,CACP,QAAS,eACT,SAAU,UACV,cAAe,eAKd,WAAkB,EAIvB,CACA,KAAM,CAAE,OAAM,OAAM,QAAS,EACvB,EAAU,IAEhB,MACE,iBAAoB,IAAK,CAAE,QAAS,QAChC,gBAAoB,IAAK,CAAE,GAAI,EAAG,UAAW,EAAQ,SACnD,gBAAoB,IAAY,CAAE,UAAW,OAC3C,EAAO,gBAAoB,EAAM,MAAS,gBAAoB,IAAc,QAGhF,gBAAoB,IAAK,CAAE,SAAU,KACnC,gBAAoB,OAAM,CAAE,GAAI,EAAM,OAAQ,SAAU,IAAK,YAC3D,GAAQ,K,eC/BpB,KAAM,GAAc,CAClB,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,GAGC,WACL,EACA,C,QACA,KAAM,GAAU,CACd,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,MAGhE,GAAI,GAAY,EAEhB,GAAI,MAAO,IAAS,SAClB,EAAY,MACP,CACL,KAAM,GAAa,KAAQ,KAAK,GAAK,IAAM,QAAxB,OAAiC,KACpD,EAAY,oBAAO,KAAP,OAAsB,EAAY,GAGhD,MAAO,GCbF,WAAuB,EAAO,CACnC,KAAM,CAAE,QAAO,OAAO,QAAc,EAC9B,EAAY,EAAkB,GAEpC,MACE,iBAAoB,IAAW,CAAE,UAAW,OAAQ,KAAM,GACtD,EAAM,IAAI,CAAC,CAAE,OAAM,OAAM,QAAQ,IACjC,gBAAoB,IAAe,CAAE,IAAK,GACtC,gBAAoB,EAAU,CAAE,KAAM,EAAM,KAAM,UAAQ,EAAM,KAAM,O,eCX3E,WAAyB,EAAO,C,MACrC,KAAM,CAAE,OAAO,OAAW,WAAY,EAChC,CAAE,UAAW,kBACb,EAAM,eAEN,EAAgB,GAAK,C,MACzB,UAAM,KAAI,cAAc,KAAlB,OAAyC,KAE3C,EAAQ,oBAAQ,WAAR,cAAkB,MAEhC,MACE,iBAAoB,WAAU,CAAE,MAAO,QAAS,QAAS,GACrD,CAAC,GAAS,EAAM,SAAW,EAC3B,gBAAoB,EAAuB,MAE3C,gBAAoB,EAAe,CACjC,KAAM,EACN,MAAO,EAAM,IAAI,CAAC,CAAE,MAAK,QAAO,UAAY,EAC1C,KAAM,UAAS,EACf,KAAM,EACN,KAAM,EAAa","file":"static/1959.657c7008.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,OAEjC,EAA0B,EAAQ,OAEtC,EAA6C,CAC3C,MAAO,IAET,EAAQ,EAAU,OAElB,GAAI,GAAQ,EAAwB,EAAQ,OAExC,EAAiB,EAAuB,EAAQ,QAEhD,EAAY,GAAG,EAAe,SAAuB,EAAM,cAAc,OAAQ,CACnF,EAAG,8yBACD,YAEJ,EAAQ,EAAU,G,0JCElB,KAAM,GAAc;AAAA;AAAA;AAAA;AAAA;AAAA,uBAUd,EAAY,QAChB,GAAU,EACR,KAAM,CACJ,aAAc,EACd,OAAQ,GAAG,EAAM,QAAQ,WACzB,WAAY,EAAM,QAAQ,OAAS,OAAS,OAAS,UAGzD,CAAE,KAAM,uCAGH,YAAiC,CACtC,KAAM,GAAU,IAEhB,MACE,iBAAoB,WAAgB,KAChC,gBAAoB,IAAY,CAAE,QAAS,SAAW,sHAItD,gBAAoB,MAAO,CAAE,UAAW,EAAQ,MAC9C,gBAAoB,cAAa,CACjC,KAAM,EACN,SAAU,OACV,gBAAiB,GACjB,mBAAoB,CAAC,EAAG,EAAG,EAAG,GAC9B,YAAa,CAAE,WAAY,UAAW,SAAU,WAGlD,gBAAoB,IAAQ,CAC5B,QAAS,YACT,MAAO,UACP,OAAQ,SACR,KAAM,wFACN,c,qCC3CR,KAAM,GAAY,QAAW,CAC3B,QAAS,CACP,QAAS,eACT,QAAS,CACP,QAAS,eACT,SAAU,UACV,cAAe,eAKd,WAAkB,EAIvB,CACA,KAAM,CAAE,OAAM,OAAM,QAAS,EACvB,EAAU,IAEhB,MACE,iBAAoB,IAAK,CAAE,QAAS,QAChC,gBAAoB,IAAK,CAAE,GAAI,EAAG,UAAW,EAAQ,SACnD,gBAAoB,IAAY,CAAE,UAAW,OAC3C,EAAO,gBAAoB,EAAM,MAAS,gBAAoB,IAAc,QAGhF,gBAAoB,IAAK,CAAE,SAAU,KACnC,gBAAoB,OAAM,CAAE,GAAI,EAAM,OAAQ,SAAU,IAAK,YAC3D,GAAQ,K,eC/BpB,KAAM,GAAc,CAClB,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,GAGC,WACL,EACA,C,QACA,KAAM,GAAU,CACd,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,KAC9D,QAAe,GAAU,EAAM,YAAY,GAAG,OAAS,KAAO,MAGhE,GAAI,GAAY,EAEhB,GAAI,MAAO,IAAS,SAClB,EAAY,MACP,CACL,KAAM,GAAa,KAAQ,KAAK,GAAK,IAAM,QAAxB,OAAiC,KACpD,EAAY,oBAAO,KAAP,OAAsB,EAAY,GAGhD,MAAO,GCbF,WAAuB,EAAO,CACnC,KAAM,CAAE,QAAO,OAAO,QAAc,EAC9B,EAAY,EAAkB,GAEpC,MACE,iBAAoB,IAAW,CAAE,UAAW,OAAQ,KAAM,GACtD,EAAM,IAAI,CAAC,CAAE,OAAM,OAAM,QAAQ,IACjC,gBAAoB,IAAe,CAAE,IAAK,GACtC,gBAAoB,EAAU,CAAE,KAAM,EAAM,KAAM,UAAQ,EAAM,KAAM,O,eCX3E,WAAyB,EAAO,C,MACrC,KAAM,CAAE,OAAO,OAAW,WAAY,EAChC,CAAE,UAAW,kBACb,EAAM,eAEN,EAAgB,GAAK,C,MACzB,UAAM,KAAI,cAAc,KAAlB,OAAyC,KAE3C,EAAQ,oBAAQ,WAAR,cAAkB,MAEhC,MACE,iBAAoB,WAAU,CAAE,MAAO,QAAS,QAAS,GACrD,CAAC,GAAS,EAAM,SAAW,EAC3B,gBAAoB,EAAuB,MAE3C,gBAAoB,EAAe,CACjC,KAAM,EACN,MAAO,EAAM,IAAI,CAAC,CAAE,MAAK,QAAO,UAAY,EAC1C,KAAM,UAAS,EACf,KAAM,EACN,KAAM,EAAa","file":"static/1959.3c856a1e.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
|
-
"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(
|
|
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(29663),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.
|
|
3
|
+
//# sourceMappingURL=2426.0fc592b4.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,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/2426.
|
|
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,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/2426.0fc592b4.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
|
-
"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(
|
|
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(29663),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.
|
|
3
|
+
//# sourceMappingURL=390.879c2086.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,2B,ufCed,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/390.
|
|
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,2B,ufCed,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/390.879c2086.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
|
-
"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(
|
|
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(29663),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.
|
|
3
|
+
//# sourceMappingURL=4022.0fe21618.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,0B,ufCerB,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/4022.
|
|
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,0B,ufCerB,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/4022.0fe21618.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([[6105],{46105:function(R,r,e){e.r(r),e.d(r,{HomePageSearchBar:function(){return f}});var a=e(2784),c=e(79692),u=e(1795),l=e(19126),d=e.n(l),h=e(10289),S=e(20863),v=e(36964);const i=()=>{const t=(0,v.useRouteRef)(S._Z),s=(0,h.s0)();return(0,a.useCallback)(({query:n})=>{const o=d().stringify({query:n},{addQueryPrefix:!0});s(`${t()}${o}`)},[s,t])},m=(0,c.Z)({root:{border:"1px solid #555",borderRadius:"6px",fontSize:"1.5em"}}),f=({...t})=>{const s=m(t),[n,o]=(0,a.useState)(""),g=i(),y=()=>{g({query:n})},C=(0,a.useCallback)(B=>{o(B)},[o]);return a.createElement(u.SearchBarBase,{classes:{root:s.root},value:n,onSubmit:y,onChange:C,...t})}}}]);})();
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=6105.
|
|
3
|
+
//# sourceMappingURL=6105.6eda23ad.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/search/src/components/util.ts","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/search/src/components/HomePageComponent/HomePageSearchBar.tsx"],"names":[],"mappings":"kSAsBO,KAAM,GAAqB,IAAM,CACtC,KAAM,GAAc,kBAAY,MAC1B,EAAW,WACjB,MAAO,kBACL,CAAC,CAAE,WAAY,CACb,KAAM,GAAc,cAAa,CAAE,SAAS,CAAE,eAAgB,KAE9D,EAAS,GAAG,MAAgB,MAE9B,CAAC,EAAU,KCTT,EAAY,QAAW,CAC3B,KAAM,CACJ,OAAQ,iBACR,aAAc,MACd,SAAU,WAkBD,EAAoB,CAAC,IAAK,KAAY,CACjD,KAAM,GAAU,EAAU,GACpB,CAAC,EAAO,GAAY,eAAS,IAC7B,EAAe,IAEf,EAAe,IAAM,CACzB,EAAa,CAAE,WAGX,EAAe,kBACnB,GAAS,CACP,EAAS,IAEX,CAAC,IAGH,MACE,iBAAoB,gBAAe,CACjC,QAAS,CAAE,KAAM,EAAQ,MACzB,MAAO,EACP,SAAU,EACV,SAAU,KACP","file":"static/6105.
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/search/src/components/util.ts","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/search/src/components/HomePageComponent/HomePageSearchBar.tsx"],"names":[],"mappings":"kSAsBO,KAAM,GAAqB,IAAM,CACtC,KAAM,GAAc,kBAAY,MAC1B,EAAW,WACjB,MAAO,kBACL,CAAC,CAAE,WAAY,CACb,KAAM,GAAc,cAAa,CAAE,SAAS,CAAE,eAAgB,KAE9D,EAAS,GAAG,MAAgB,MAE9B,CAAC,EAAU,KCTT,EAAY,QAAW,CAC3B,KAAM,CACJ,OAAQ,iBACR,aAAc,MACd,SAAU,WAkBD,EAAoB,CAAC,IAAK,KAAY,CACjD,KAAM,GAAU,EAAU,GACpB,CAAC,EAAO,GAAY,eAAS,IAC7B,EAAe,IAEf,EAAe,IAAM,CACzB,EAAa,CAAE,WAGX,EAAe,kBACnB,GAAS,CACP,EAAS,IAEX,CAAC,IAGH,MACE,iBAAoB,gBAAe,CACjC,QAAS,CAAE,KAAM,EAAQ,MACzB,MAAO,EACP,SAAU,EACV,SAAU,KACP","file":"static/6105.6eda23ad.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 */\nimport qs from 'qs';\nimport { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { rootRouteRef } from '../plugin';\n\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\nexport const useNavigateToQuery = () => {\n const searchRoute = useRouteRef(rootRouteRef);\n const navigate = useNavigate();\n return useCallback(\n ({ query }) => {\n const queryString = qs.stringify({ query }, { addQueryPrefix: true });\n\n navigate(`${searchRoute()}${queryString}`);\n },\n [navigate, searchRoute],\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, { useCallback, useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport { SearchBarBase, } from '../SearchBar';\nimport { useNavigateToQuery } from '../util';\n\nconst useStyles = makeStyles({\n root: {\n border: '1px solid #555',\n borderRadius: '6px',\n fontSize: '1.5em',\n },\n});\n\n/**\n * Props for {@link HomePageSearchBar}.\n *\n * @public\n */\n\n\n\n\n/**\n * The search bar created specifically for the composable home page\n *\n * @public\n */\nexport const HomePageSearchBar = ({ ...props }) => {\n const classes = useStyles(props);\n const [query, setQuery] = useState('');\n const handleSearch = useNavigateToQuery();\n\n const handleSubmit = () => {\n handleSearch({ query });\n };\n\n const handleChange = useCallback(\n value => {\n setQuery(value);\n },\n [setQuery],\n );\n\n return (\n React.createElement(SearchBarBase, {\n classes: { root: classes.root },\n value: query,\n onSubmit: handleSubmit,\n onChange: handleChange,\n ...props,}\n )\n );\n};\n"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
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(
|
|
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(29663),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.
|
|
3
|
+
//# sourceMappingURL=6235.c0346cdc.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,0B,ufCYrB,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/6235.
|
|
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,0B,ufCYrB,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,kBACb,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,IAGR,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,WAAU,OAKlC,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,GACrD,gBAAoB,qBAAoB,CAAE,MAAO,KAMvD,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,WAC7C,gBAAoB,IAAY,CAAE,QAAS,SAAW,GACtD,gBAAoB,IAAY,CAAE,QAAS,SACzC,gBAAoB,OAAM,CAAE,GAAI,GAAiB,+BAIzD,QAAS,EACT,SAAU,EAAqB,GAAY,MCjF1C,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,cACzD,0CACA,6CACA,kDACA,yDAEW,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,aACzD,0CACA,6CACA,kDACA,yDAEW,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,WACzD,0CACA,yDAEW,EACX,oFACW,EAAoB,GAC/B","file":"static/6235.c0346cdc.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":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
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(29663),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
|
+
|
|
3
|
+
//# sourceMappingURL=6583.ad8c5d41.chunk.js.map
|
|
@@ -0,0 +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,kBAC9C,EAAW,WACX,EAAW,aAAO,eAClB,EAAa,aAAO,iBAEpB,CACJ,MAAO,EACP,QACA,UACA,MAAO,GACL,QACF,IAAM,EAAW,eAAe,CAAE,OAAM,YAAW,SACnD,CAAC,EAAY,EAAM,EAAW,IAGhC,sBAAU,IAAM,CACT,GACH,GAAS,KAAK,GAAI,OAAM,sBACxB,EAAS,OAEV,CAAC,EAAU,EAAU,EAAO,EAAS,EAAQ,IAEzC,CAAE,SAAQ,UAAS,QAAO,YC/B5B,YAA6B,CAClC,MACE,iBAAoB,sBAAqB,IAAK,KAC1C,gBAAoB,KAAQ","file":"static/6583.ad8c5d41.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":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7110],{57110:function(B,C,n){n.r(C),n.d(C,{TechDocsCustomHome:function(){return v}});var e=n(2784),f=n(64279),O=n(79692),i=n(29663),P=n(48023),T=n(21956),A=n(51016),_=n(1114),a=n(9118),d=n(36964);const M={DocsTable:T.DocsTable,DocsCardGrid:A.f},y=({config:t,entities:s,index:l})=>{const m=(0,O.Z)({panelContainer:{marginBottom:"2rem",...t.panelCSS?t.panelCSS:{}}})(),{value:r}=R(),p=M[t.panelType],u=s.filter(E=>t.filterPredicate==="ownedByUser"?r?(0,i.isOwnerOf)(r,E):!1:typeof t.filterPredicate=="function"&&t.filterPredicate(E));return e.createElement(e.Fragment,null,e.createElement(a.ContentHeader,{title:t.title,description:t.description},l===0?e.createElement(a.SupportButton,null,"Discover documentation in your ecosystem."):null),e.createElement("div",{className:m.panelContainer},e.createElement(p,{"data-testid":"techdocs-custom-panel",entities:u})))},v=t=>{const{tabsConfig:s}=t,[l,D]=(0,e.useState)(0),m=(0,d.useApi)(i.catalogApiRef),{value:r,loading:p,error:u}=(0,f.default)(async()=>(await m.getEntities({filter:{"metadata.annotations.backstage.io/techdocs-ref":i.CATALOG_FILTER_EXISTS},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(c=>{var g;return!!((g=c.metadata.annotations)==null?void 0:g["backstage.io/techdocs-ref"])})),E=s[l];return p?e.createElement(_.j,null,e.createElement(a.Content,null,e.createElement(a.Progress,null))):u?e.createElement(_.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:u.toString()})))):e.createElement(_.j,null,e.createElement(a.HeaderTabs,{selectedIndex:l,onChange:o=>D(o),tabs:s.map(({label:o},c)=>({id:c.toString(),label:o}))}),e.createElement(a.Content,{"data-testid":"techdocs-content"},E.panels.map((o,c)=>e.createElement(y,{key:c,config:o,entities:r||[],index:c}))))};function R(){const t=(0,d.useApi)(i.catalogApiRef),s=(0,d.useApi)(d.identityApiRef);return(0,f.default)(async()=>{const l=await s.getBackstageIdentity();return t.getEntityByRef((0,P.of)(l.userEntityRef,{defaultKind:"User",defaultNamespace:P.zG}))},[t,s])}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=7110.5f7b5114.chunk.js.map
|
|
@@ -0,0 +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":"0TAgDA,KAAM,GAAS,CACb,UAAW,YACX,aAAc,KAwCV,EAAc,CAAC,CACnB,SACA,WACA,WAKG,CAOH,KAAM,GAAU,GANE,KAAW,CAC3B,eAAgB,CACd,aAAc,UACV,EAAO,SAAW,EAAO,SAAW,QAItC,CAAE,MAAO,GAAS,IAElB,EAAQ,EAAO,EAAO,WAEtB,EAAgB,EAAS,OAAO,GAChC,EAAO,kBAAoB,cACxB,EAGE,gBAAU,EAAM,GAFd,GAMT,MAAO,GAAO,iBAAoB,YAClC,EAAO,gBAAgB,IAI3B,MACE,iBAAoB,WAAgB,KAChC,gBAAoB,gBAAe,CAAE,MAAO,EAAO,MAAO,YAAa,EAAO,aAC5E,IAAU,EACV,gBAAoB,gBAAe,KAAM,6CAGvC,MAEJ,gBAAoB,MAAO,CAAE,UAAW,EAAQ,gBAC9C,gBAAoB,EAAO,CAAE,cAAe,wBAAyB,SAAU,OAe5E,EAAsB,GAAU,CAC3C,KAAM,CAAE,cAAe,EACjB,CAAC,EAAa,GAAkB,eAAS,GACzC,EAAa,aAAO,iBAEpB,CACJ,MAAO,EACP,UACA,SACE,cAAS,SAcJ,MAbgB,GAAW,YAAY,CAC5C,OAAQ,CACN,iDAAkD,yBAEpD,OAAQ,CACN,aACA,OACA,WACA,YACA,aACA,gBAGY,MAAM,OAAQ,GAAW,C,MACvC,MAAO,CAAC,CAAC,MAAO,SAAS,cAAhB,cAA8B,iCAIrC,EAAmB,EAAW,GAEpC,MAAI,GAEA,gBAAoB,IAAqB,KACrC,gBAAoB,UAAS,KAC3B,gBAAoB,WAAU,QAMpC,EAEA,gBAAoB,IAAqB,KACrC,gBAAoB,UAAS,KAC3B,gBAAoB,eAAc,CAClC,SAAU,QACV,MAAO,2CAEL,gBAAoB,cAAa,CAAE,SAAU,OAAQ,KAAM,EAAM,gBAQ3E,gBAAoB,IAAqB,KACrC,gBAAoB,aAAY,CAChC,cAAe,EACf,SAAU,GAAS,EAAe,GAClC,KAAM,EAAW,IAAI,CAAC,CAAE,SAAS,IAAW,EAC1C,GAAI,EAAM,WACV,aAGF,gBAAoB,UAAS,CAAE,cAAe,oBAC5C,EAAiB,OAAO,IAAI,CAAC,EAAQ,IACrC,gBAAoB,EAAa,CAC/B,IAAK,EACL,OAAQ,EACR,SAAY,GAAsB,GAClC,MAAO,QAQnB,YAAsB,CACpB,KAAM,GAAa,aAAO,iBACpB,EAAc,aAAO,kBAE3B,MAAO,cAAS,SAAY,CAC1B,KAAM,GAAW,KAAM,GAAY,uBAMnC,MAAO,GAAW,eAChB,SAAe,EAAS,cAAe,CACrC,YAAa,OACb,iBAAkB,SAGrB,CAAC,EAAY","file":"static/7110.5f7b5114.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 isOwnerOf,\n} from '@backstage/plugin-catalog-react';\nimport {\n DEFAULT_NAMESPACE,\n\n parseEntityRef,\n\n} from '@backstage/catalog-model';\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';\n\nimport { identityApiRef, 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 { value: user } = useOwnUser();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (!user) {\n return false;\n }\n return isOwnerOf(user, 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\nfunction useOwnUser() {\n const catalogApi = useApi(catalogApiRef);\n const identityApi = useApi(identityApiRef);\n\n return useAsync(async () => {\n const identity = await identityApi.getBackstageIdentity();\n // TODO(freben): Defensively parse with defaults even though getEntityByRef\n // supports the string form, since some auth resolvers have been known to\n // return incomplete refs (just the name part) historically. This can be\n // simplified in the future to just pass the ref immediately to\n // getEntityByRef.\n return catalogApi.getEntityByRef(\n parseEntityRef(identity.userEntityRef, {\n defaultKind: 'User',\n defaultNamespace: DEFAULT_NAMESPACE,\n }),\n ) ;\n }, [catalogApi, identityApi]);\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7758],{7758:function(h,r,t){t.r(r),t.d(r,{CatalogPage:function(){return f},DefaultCatalogPage:function(){return i}});var e=t(2784),E=t(10289),l=t(9118),a=t(36964),n=t(29663),g=t(47851),d=t(30097),o=t(26997),C=t(49782);function i(c){var s;const{columns:u,actions:y,initiallySelectedFilter:P="owned"}=c,v=(s=(0,a.useApi)(a.configApiRef).getOptionalString("organization.name"))!=null?s:"Backstage",m=(0,a.useRouteRef)(g.yw);return e.createElement(l.PageWithHeader,{title:`${v} Catalog`,themeId:"home"},e.createElement(n.EntityListProvider,null,e.createElement(l.Content,null,e.createElement(l.ContentHeader,{titleComponent:e.createElement(C.K,null)},e.createElement(l.CreateButton,{title:"Create Component",to:m&&m()}),e.createElement(l.SupportButton,null,"All your software catalog entities")),e.createElement(o.q7,null,e.createElement(o.Gh,null,e.createElement(n.EntityTypePicker,null),e.createElement(n.UserListPicker,{initialFilter:P}),e.createElement(n.EntityOwnerPicker,null),e.createElement(n.EntityLifecyclePicker,null),e.createElement(n.EntityTagPicker,null)),e.createElement(o.Nz,null,e.createElement(d.E,{columns:u,actions:y}))))))}function f(c){return(0,E.pC)()||e.createElement(i,{...c})}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=7758.2fe27149.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":"gVAwDO,WAA4B,EAAO,C,MACxC,KAAM,CAAE,UAAS,UAAS,0BAA0B,SAAY,EAC1D,EACJ,G,GAAA,UAAO,gBAAc,kBAAkB,uBAAvC,OAA+D,YAC3D,EAAsB,kBAAY,
|
|
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":"gVAwDO,WAA4B,EAAO,C,MACxC,KAAM,CAAE,UAAS,UAAS,0BAA0B,SAAY,EAC1D,EACJ,G,GAAA,UAAO,gBAAc,kBAAkB,uBAAvC,OAA+D,YAC3D,EAAsB,kBAAY,MAExC,MACE,iBAAoB,iBAAgB,CAAE,MAAO,GAAG,YAAmB,QAAS,QACxE,gBAAoB,qBAAoB,KACtC,gBAAoB,UAAS,KAC3B,gBAAoB,gBAAe,CAAE,eAAgB,gBAAoB,IAAmB,OAC1F,gBAAoB,eAAc,CAClC,MAAO,mBACP,GAAI,GAAuB,MAE3B,gBAAoB,gBAAe,KAAM,uCAE3C,gBAAoB,KAAsB,KACxC,gBAAoB,KAAiB,KACnC,gBAAoB,mBAAkB,MACtC,gBAAoB,iBAAgB,CAAE,cAAe,IACrD,gBAAoB,oBAAmB,MACvC,gBAAoB,wBAAuB,MAC3C,gBAAoB,kBAAiB,OAEvC,gBAAoB,KAAqB,KACvC,gBAAoB,IAAc,CAAE,QAAS,EAAS,QAAS,SC3DxE,WAAqB,EAAO,CAGjC,MAAO,GAFQ,SAEE,gBAAoB,EAAoB,IAAK","file":"static/7758.2fe27149.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 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 {\n FilteredEntityLayout,\n EntityListContainer,\n FilterContainer,\n} from '../FilteredEntityLayout';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\n\n\n\n\n\n\nexport function DefaultCatalogPage(props) {\n const { columns, actions, initiallySelectedFilter = 'owned' } = 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, { titleComponent: React.createElement(CatalogKindHeader, null ),}\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(FilteredEntityLayout, null\n , React.createElement(FilterContainer, 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(EntityListContainer, null\n , React.createElement(CatalogTable, { columns: columns, actions: actions,} )\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":""}
|