@techdocs/cli 1.1.1-next.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/cjs/{serve-aa1ff626.cjs.js → serve-48337ec4.cjs.js} +5 -5
- package/dist/cjs/serve-48337ec4.cjs.js.map +1 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/1553.0a1ffcc9.chunk.js +3 -0
- package/dist/embedded-app/static/{1553.a6edce0e.chunk.js.map → 1553.0a1ffcc9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1959.55365235.chunk.js → 1959.54b727f3.chunk.js} +2 -2
- package/dist/embedded-app/static/{1959.55365235.chunk.js.map → 1959.54b727f3.chunk.js.map} +1 -1
- package/dist/embedded-app/static/2426.75b31251.chunk.js +3 -0
- package/dist/embedded-app/static/{2426.b371eaed.chunk.js.map → 2426.75b31251.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3860.8a0dac3d.chunk.js +3 -0
- package/dist/embedded-app/static/3860.8a0dac3d.chunk.js.map +1 -0
- package/dist/embedded-app/static/390.97868757.chunk.js +3 -0
- package/dist/embedded-app/static/{390.5623153b.chunk.js.map → 390.97868757.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4022.f3d67914.chunk.js +3 -0
- package/dist/embedded-app/static/{4022.6f52e9cc.chunk.js.map → 4022.f3d67914.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6235.5c01917c.chunk.js +3 -0
- package/dist/embedded-app/static/{6235.7e3710fd.chunk.js.map → 6235.5c01917c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7110.4f2d78ba.chunk.js +3 -0
- package/dist/embedded-app/static/{7110.7d2c1934.chunk.js.map → 7110.4f2d78ba.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7758.e94e2380.chunk.js +3 -0
- package/dist/embedded-app/static/{7758.f316879f.chunk.js.map → 7758.e94e2380.chunk.js.map} +1 -1
- package/dist/embedded-app/static/8061.a19d3b9a.chunk.js +3 -0
- package/dist/embedded-app/static/{8061.3f3d9ba3.chunk.js.map → 8061.a19d3b9a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/8792.2624b294.chunk.js +3 -0
- package/dist/embedded-app/static/{8792.b1d581fc.chunk.js.map → 8792.2624b294.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9028.e4b797db.chunk.js +3 -0
- package/dist/embedded-app/static/{9028.abe94909.chunk.js.map → 9028.e4b797db.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.f8792fde.js +476 -0
- package/dist/embedded-app/static/main.f8792fde.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.84a6ac87.js → module-material-ui.2f7d5af1.js} +2 -2
- package/dist/embedded-app/static/module-material-ui.2f7d5af1.js.map +1 -0
- package/dist/embedded-app/static/{runtime.42d41e6f.js → runtime.f8792fde.js} +2 -2
- package/dist/embedded-app/static/runtime.f8792fde.js.map +1 -0
- package/dist/embedded-app/static/vendor.f8792fde.js +103 -0
- package/dist/embedded-app/static/vendor.f8792fde.js.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/package.json +9 -9
- package/dist/cjs/serve-aa1ff626.cjs.js.map +0 -1
- package/dist/embedded-app/static/1553.a6edce0e.chunk.js +0 -3
- package/dist/embedded-app/static/2426.b371eaed.chunk.js +0 -3
- package/dist/embedded-app/static/3860.da7e5f63.chunk.js +0 -3
- package/dist/embedded-app/static/3860.da7e5f63.chunk.js.map +0 -1
- package/dist/embedded-app/static/390.5623153b.chunk.js +0 -3
- package/dist/embedded-app/static/4022.6f52e9cc.chunk.js +0 -3
- package/dist/embedded-app/static/6235.7e3710fd.chunk.js +0 -3
- package/dist/embedded-app/static/7110.7d2c1934.chunk.js +0 -3
- package/dist/embedded-app/static/7758.f316879f.chunk.js +0 -3
- package/dist/embedded-app/static/8061.3f3d9ba3.chunk.js +0 -3
- package/dist/embedded-app/static/8792.b1d581fc.chunk.js +0 -3
- package/dist/embedded-app/static/9028.abe94909.chunk.js +0 -3
- package/dist/embedded-app/static/main.42d41e6f.js +0 -476
- package/dist/embedded-app/static/main.42d41e6f.js.map +0 -1
- package/dist/embedded-app/static/module-aria-query.f720b73c.js +0 -9
- package/dist/embedded-app/static/module-aria-query.f720b73c.js.map +0 -1
- package/dist/embedded-app/static/module-hot-loader.7955a91c.js +0 -32
- package/dist/embedded-app/static/module-hot-loader.7955a91c.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.84a6ac87.js.map +0 -1
- package/dist/embedded-app/static/module-testing-library.633b23c6.js +0 -57
- package/dist/embedded-app/static/module-testing-library.633b23c6.js.map +0 -1
- package/dist/embedded-app/static/runtime.42d41e6f.js.map +0 -1
- package/dist/embedded-app/static/vendor.42d41e6f.js +0 -117
- package/dist/embedded-app/static/vendor.42d41e6f.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 344ea56acc: Bump `commander` to version 9.1.0
|
|
8
|
+
- 52fddad92d: The TechDocs CLI's embedded app now imports all API refs from the `@backstage/plugin-techdocs-react` package.
|
|
9
|
+
- c14e78a367: Update `techdocs-cli serve`'s `proxyEndpoint` to match the base URL of the embedded techdocs app.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- @backstage/backend-common@0.13.3
|
|
12
|
+
- @backstage/cli-common@0.1.9
|
|
13
|
+
- @backstage/config@1.0.1
|
|
14
|
+
- @backstage/plugin-techdocs-node@1.1.1
|
|
15
|
+
- @backstage/catalog-model@1.0.2
|
|
16
|
+
|
|
17
|
+
## 1.1.1-next.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/backend-common@0.13.3-next.2
|
|
23
|
+
- @backstage/cli-common@0.1.9-next.0
|
|
24
|
+
- @backstage/config@1.0.1-next.0
|
|
25
|
+
- @backstage/catalog-model@1.0.2-next.0
|
|
26
|
+
- @backstage/plugin-techdocs-node@1.1.1-next.1
|
|
27
|
+
|
|
28
|
+
## 1.1.1-next.1
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 52fddad92d: The TechDocs CLI's embedded app now imports all API refs from the `@backstage/plugin-techdocs-react` package.
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @backstage/backend-common@0.13.3-next.1
|
|
35
|
+
|
|
3
36
|
## 1.1.1-next.0
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -21,7 +21,7 @@ var httpProxy__default = /*#__PURE__*/_interopDefaultLegacy(httpProxy);
|
|
|
21
21
|
|
|
22
22
|
class HTTPServer {
|
|
23
23
|
constructor(backstageBundleDir, backstagePort, mkdocsPort, verbose) {
|
|
24
|
-
this.proxyEndpoint = "/api/";
|
|
24
|
+
this.proxyEndpoint = "/api/techdocs/";
|
|
25
25
|
this.backstageBundleDir = backstageBundleDir;
|
|
26
26
|
this.backstagePort = backstagePort;
|
|
27
27
|
this.mkdocsPort = mkdocsPort;
|
|
@@ -32,9 +32,9 @@ class HTTPServer {
|
|
|
32
32
|
target: `http://localhost:${this.mkdocsPort}`
|
|
33
33
|
});
|
|
34
34
|
return (request) => {
|
|
35
|
-
var _a
|
|
36
|
-
const
|
|
37
|
-
const forwardPath =
|
|
35
|
+
var _a;
|
|
36
|
+
const proxyEndpointPath = new RegExp(`^${this.proxyEndpoint}`, "i");
|
|
37
|
+
const forwardPath = ((_a = request.url) == null ? void 0 : _a.replace(proxyEndpointPath, "")) || "";
|
|
38
38
|
return [proxy, forwardPath];
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -142,4 +142,4 @@ Opening browser.`);
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
exports["default"] = serve;
|
|
145
|
-
//# sourceMappingURL=serve-
|
|
145
|
+
//# sourceMappingURL=serve-48337ec4.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve-48337ec4.cjs.js","sources":["../../src/lib/httpServer.ts","../../src/commands/serve/serve.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 serveHandler from 'serve-handler';\nimport http from 'http';\nimport httpProxy from 'http-proxy';\nimport { createLogger } from './utility';\n\nexport default class HTTPServer {\n private readonly proxyEndpoint: string;\n private readonly backstageBundleDir: string;\n private readonly backstagePort: number;\n private readonly mkdocsPort: number;\n private readonly verbose: boolean;\n\n constructor(\n backstageBundleDir: string,\n backstagePort: number,\n mkdocsPort: number,\n verbose: boolean,\n ) {\n this.proxyEndpoint = '/api/techdocs/';\n this.backstageBundleDir = backstageBundleDir;\n this.backstagePort = backstagePort;\n this.mkdocsPort = mkdocsPort;\n this.verbose = verbose;\n }\n\n // Create a Proxy for mkdocs server\n private createProxy() {\n const proxy = httpProxy.createProxyServer({\n target: `http://localhost:${this.mkdocsPort}`,\n });\n\n return (request: http.IncomingMessage): [httpProxy, string] => {\n // If the request path is prefixed with this.proxyEndpoint, remove it.\n const proxyEndpointPath = new RegExp(`^${this.proxyEndpoint}`, 'i');\n const forwardPath = request.url?.replace(proxyEndpointPath, '') || '';\n\n return [proxy, forwardPath];\n };\n }\n\n public async serve(): Promise<http.Server> {\n return new Promise<http.Server>((resolve, reject) => {\n const proxyHandler = this.createProxy();\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n if (request.url?.startsWith(this.proxyEndpoint)) {\n const [proxy, forwardPath] = proxyHandler(request);\n\n proxy.on('error', (error: Error) => {\n reject(error);\n });\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n\n request.url = forwardPath;\n proxy.web(request, response);\n return;\n }\n\n // This endpoint is used by the frontend to detect where the backend is running.\n if (request.url === '/.detect') {\n response.setHeader('Content-Type', 'text/plain');\n response.end('techdocs-cli-server');\n return;\n }\n\n serveHandler(request, response, {\n public: this.backstageBundleDir,\n trailingSlash: true,\n rewrites: [{ source: '**', destination: 'index.html' }],\n });\n },\n );\n\n const logger = createLogger({ verbose: false });\n server.listen(this.backstagePort, () => {\n if (this.verbose) {\n logger.info(\n `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`,\n );\n }\n resolve(server);\n });\n\n server.on('error', (error: Error) => {\n reject(error);\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 { OptionValues } from 'commander';\nimport path from 'path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport { findPaths } from '@backstage/cli-common';\nimport HTTPServer from '../../lib/httpServer';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { LogFunc, waitForSignal } from '../../lib/run';\nimport { createLogger } from '../../lib/utility';\n\nfunction findPreviewBundlePath(): string {\n try {\n return path.join(\n path.dirname(require.resolve('techdocs-cli-embedded-app/package.json')),\n 'dist',\n );\n } catch {\n // If the techdocs-cli-embedded-app package is not available it means we're\n // running a published package. For published packages the preview bundle is\n // copied to dist/embedded-app be the prepack script.\n //\n // This can be tested by running `yarn pack` and extracting the resulting tarball into a directory.\n // Within the extracted directory, run `npm install --only=prod`.\n // Once that's done you can test the CLI in any directory using `node <tmp-dir>/package <command>`.\n // eslint-disable-next-line no-restricted-syntax\n return findPaths(__dirname).resolveOwn('dist/embedded-app');\n }\n}\n\nexport default async function serve(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n // Determine if we want to run in local dev mode or not\n // This will run the backstage http server on a different port and only used\n // for proxying mkdocs to the backstage app running locally (e.g. with webpack-dev-server)\n const isDevMode = Object.keys(process.env).includes('TECHDOCS_CLI_DEV_MODE')\n ? true\n : false;\n\n // TODO: Backstage app port should also be configurable as a CLI option. However, since we bundle\n // a backstage app, we define app.baseUrl in the app-config.yaml.\n // Hence, it is complicated to make this configurable.\n const backstagePort = 3000;\n const backstageBackendPort = 7007;\n\n const mkdocsDockerAddr = `http://0.0.0.0:${opts.mkdocsPort}`;\n const mkdocsLocalAddr = `http://127.0.0.1:${opts.mkdocsPort}`;\n const mkdocsExpectedDevAddr = opts.docker\n ? mkdocsDockerAddr\n : mkdocsLocalAddr;\n\n let mkdocsServerHasStarted = false;\n const mkdocsLogFunc: LogFunc = data => {\n // Sometimes the lines contain an unnecessary extra new line\n const logLines = data.toString().split('\\n');\n const logPrefix = opts.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !mkdocsServerHasStarted &&\n line.includes(`Serving on ${mkdocsExpectedDevAddr}`)\n ) {\n mkdocsServerHasStarted = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n logger.info('Starting mkdocs server.');\n const mkdocsChildProcess = await runMkdocsServer({\n port: opts.mkdocsPort,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n useDocker: opts.docker,\n stdoutLogFunc: mkdocsLogFunc,\n stderrLogFunc: mkdocsLogFunc,\n });\n\n // Wait until mkdocs server has started so that Backstage starts with docs loaded\n // Takes 1-5 seconds\n for (let attempt = 0; attempt < 30; attempt++) {\n await new Promise(r => setTimeout(r, 3000));\n if (mkdocsServerHasStarted) {\n break;\n }\n logger.info('Waiting for mkdocs server to start...');\n }\n\n if (!mkdocsServerHasStarted) {\n logger.error(\n 'mkdocs server did not start. Exiting. Try re-running command with -v option for more details.',\n );\n }\n\n const port = isDevMode ? backstageBackendPort : backstagePort;\n const httpServer = new HTTPServer(\n findPreviewBundlePath(),\n port,\n opts.mkdocsPort,\n opts.verbose,\n );\n\n httpServer\n .serve()\n .catch(err => {\n logger.error(err);\n mkdocsChildProcess.kill();\n process.exit(1);\n })\n .then(() => {\n // The last three things default/component/local/ don't matter. They can be anything.\n openBrowser(`http://localhost:${port}/docs/default/component/local/`);\n logger.info(\n `Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/\\nOpening browser.`,\n );\n });\n\n await waitForSignal([mkdocsChildProcess]);\n}\n"],"names":["httpProxy","http","serveHandler","createLogger","path","findPaths","runMkdocsServer","openBrowser","waitForSignal"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIe,MAAM,UAAU,CAAC;AAChC,EAAE,WAAW,CAAC,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE;AACtE,IAAI,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;AAC1C,IAAI,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,IAAI,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACvC,IAAI,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC,IAAI,IAAI,CAAC,OAAO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;AACzD,GAAG;AACH,EAAE,IAAI,CAAC,sBAAsB,EAAE;AAC/B,IAAI,MAAM,CAAC,KAAK,CAAC,+FAA+F,CAAC,CAAC;AAClH,GAAG;AACH,EAAE,MAAM,IAAI,GAAG,SAAS,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAChE,EAAE,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AAClG,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK;AACpC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtB,IAAI,kBAAkB,CAAC,IAAI,EAAE,CAAC;AAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM;AAChB,IAAIC,+BAAW,CAAC,CAAC,iBAAiB,EAAE,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC1E,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,8CAA8C,EAAE,IAAI,CAAC;AACtE,gBAAgB,CAAC,CAAC,CAAC;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,MAAMC,0BAAa,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAC5C;;;;"}
|
|
@@ -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.f8792fde.js"></script><script defer="defer" src="/static/module-material-ui.2f7d5af1.js"></script><script defer="defer" src="/static/module-lodash.055be129.js"></script><script defer="defer" src="/static/module-date-fns.5015b34b.js"></script><script defer="defer" src="/static/module-ajv.d6f6d109.js"></script><script defer="defer" src="/static/module-material-table.fcca9670.js"></script><script defer="defer" src="/static/module-yaml.57b26e04.js"></script><script defer="defer" src="/static/module-hot-loader.7c7a4226.js"></script><script defer="defer" src="/static/module-jss.cb0efade.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.a9014a2e.js"></script><script defer="defer" src="/static/vendor.f8792fde.js"></script><script defer="defer" src="/static/main.f8792fde.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +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(48023),t=n(2784),e=n(62426);function s(a){const{variant:c="gridItem"}=a;return t.createElement(e.RelatedEntitiesCard,{variant:c,title:"Has resources",entityKind:"Resource",relationType:r.aS,columns:e.resourceEntityColumns,asRenderableEntities:e.asResourceEntities,emptyMessage:"No resource is part of this system",emptyHelpLink:e.resourceEntityHelpLink})}},62426:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return d},asResourceEntities:function(){return C},asSystemEntities:function(){return b},componentEntityColumns:function(){return c},componentEntityHelpLink:function(){return E},resourceEntityColumns:function(){return p},resourceEntityHelpLink:function(){return f},systemEntityColumns:function(){return T},systemEntityHelpLink:function(){return R}});var r=n(90436),t=n(53479),e=n(2784),s=n(53492);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
|
+
|
|
3
|
+
//# sourceMappingURL=1553.0a1ffcc9.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":"kPA+BO,WAA0B,EAAO,CACtC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,gBACP,WAAY,WACZ,aAAc,KACd,QAAS,wBACT,qBAAsB,qBACtB,aAAc,qCACd,cAAe,wBAAuB,CACxC,CAEJ,C,
|
|
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":"kPA+BO,WAA0B,EAAO,CACtC,KAAM,CAAE,UAAU,YAAe,EACjC,MACE,iBAAoB,sBAAqB,CACvC,QAAS,EACT,MAAO,gBACP,WAAY,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553.0a1ffcc9.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';\n\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\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(53479),d=n(52160),e=n(2784),h=n(79692),f=n(90436),y=n(77277),E=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(53479),d=n(52160),e=n(2784),h=n(79692),f=n(90436),y=n(77277),E=n(53492);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.54b727f3.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@material-ui/icons/Language.js","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"names":[],"mappings":"yJAEI,EAAyB,EAAQ,KAA8C,EAE/E,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACA,EAAQ,EAAU,OAElB,GAAI,GAAQ,EAAwB,EAAQ,IAAO,CAAC,EAEhD,EAAiB,EAAuB,EAAQ,KAAuB,CAAC,EAExE,EAAY,GAAG,EAAe,SAAuB,EAAM,cAAc,OAAQ,CACnF,EAAG,2yBACL,CAAC,EAAG,UAAU,EAEd,EAAQ,EAAU,C,4JCEl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EAAe,CACjC,KAAM,EACN,MAAO,EAAM,IAAI,CAAC,CAAE,MAAK,QAAO,UAAY,EAC1C,KAAM,UAAS,EACf,KAAM,EACN,KAAM,EAAa,CAAI,CACzB,EAAE,CAAE,CACN,CAEJ,CAEJ,C","file":"static/1959.55365235.chunk.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\n\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(Typography, { variant: \"body1\",}, \"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:\"\n\n\n )\n , React.createElement('div', { className: classes.code,}\n , React.createElement(CodeSnippet, {\n text: ENTITY_YAML,\n language: \"yaml\",\n showLineNumbers: true,\n highlightedNumbers: [3, 4, 5, 6],\n customStyle: { background: 'inherit', fontSize: '115%' },}\n )\n )\n , React.createElement(Button, {\n variant: \"contained\",\n color: \"primary\",\n target: \"_blank\",\n href: \"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\",}\n , \"Read more\"\n\n )\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\n\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props\n\n\n\n) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n React.createElement(Box, { display: \"flex\",}\n , React.createElement(Box, { mr: 1, className: classes.svgIcon,}\n , React.createElement(Typography, { component: \"div\",}\n , Icon ? React.createElement(Icon, null ) : React.createElement(LanguageIcon, null )\n )\n )\n , React.createElement(Box, { flexGrow: \"1\",}\n , React.createElement(Link, { to: href, target: \"_blank\", rel: \"noopener\",}\n , text || href\n )\n )\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMediaQuery } from '@material-ui/core';\n\n\nconst colDefaults = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols,\n) {\n const matches = [\n useMediaQuery((theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\n\nimport { useDynamicColumns } from './useDynamicColumns';\n\n\n\n\n\n\n\n\n\n\n\n\n\nexport function LinksGridList(props) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n React.createElement(ImageList, { rowHeight: \"auto\", cols: numOfCols,}\n , items.map(({ text, href, Icon }, i) => (\n React.createElement(ImageListItem, { key: i,}\n , React.createElement(IconLink, { href: href, text: text ?? href, Icon: Icon,} )\n )\n ))\n )\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\n\nimport { useApp } from '@backstage/core-plugin-api';\nimport { InfoCard, } from '@backstage/core-components';\n\n/** @public */\n\n\n\n\n\nexport function EntityLinksCard(props) {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key) =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n React.createElement(InfoCard, { title: \"Links\", variant: variant,}\n , !links || links.length === 0 ? (\n React.createElement(EntityLinksEmptyState, null )\n ) : (\n React.createElement(LinksGridList, {\n cols: cols,\n items: links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n })),}\n )\n )\n )\n );\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@material-ui/icons/Language.js","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"names":[],"mappings":"yJAEI,EAAyB,EAAQ,KAA8C,EAE/E,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACA,EAAQ,EAAU,OAElB,GAAI,GAAQ,EAAwB,EAAQ,IAAO,CAAC,EAEhD,EAAiB,EAAuB,EAAQ,KAAuB,CAAC,EAExE,EAAY,GAAG,EAAe,SAAuB,EAAM,cAAc,OAAQ,CACnF,EAAG,2yBACL,CAAC,EAAG,UAAU,EAEd,EAAQ,EAAU,C,6JCElB,KAAM,GAAc;AAAA;AAAA;AAAA;AAAA;AAAA,uBAUd,EAAY,QA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AAO,UAAY,EAC1C,KAAM,UAAS,EACf,KAAM,EACN,KAAM,EAAa,CAAI,CACzB,EAAE,CAAE,CACN,CAEJ,CAEJ,C","file":"static/1959.54b727f3.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":""}
|
|
@@ -0,0 +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(53479),e=o(2784),s=o(53492);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
|
+
|
|
3
|
+
//# sourceMappingURL=2426.75b31251.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":"
|
|
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":"qnBAyDO,WACL,EACA,CACA,KAAM,CACJ,UAAU,WACV,QACA,UACA,aACA,eACA,eACA,gBACA,wBACE,EAEE,CAAE,UAAW,gBAAU,EACvB,CAAE,WAAU,UAAS,SAAU,yBAAmB,EAAQ,CAC9D,KAAM,EACN,KAAM,CACR,CAAC,EAED,MAAI,GAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,WAAU,IAAK,CACvC,EAIA,EAEA,gBAAoB,WAAU,CAAE,QAAS,EAAS,MAAO,CAAM,EAC3D,gBAAoB,qBAAoB,CAAE,MAAO,CAAM,CAAE,CAC7D,EAKF,gBAAoB,cAAa,CAC/B,MAAO,EACP,QAAS,EACT,aACE,gBAAoB,MAAO,CAAE,MAAO,CAAE,UAAW,QAAS,CAAE,EACxD,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EAAG,CAAY,EAClE,gBAAoB,IAAY,CAAE,QAAS,OAAQ,EACjD,gBAAoB,OAAM,CAAE,GAAI,CAAc,EAAG,2BAA+B,CACpF,CACF,EAEF,QAAS,EACT,SAAU,EAAqB,GAAY,CAAC,CAAC,CAAE,CACjD,CAEJ,CCrFO,KAAM,GAAyB,CACpC,4CAA0C,CAAE,YAAa,WAAY,CAAC,EACtE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,uFACW,EAAuB,GAClC,EAEW,EAAwB,CACnC,4CAA0C,CAAE,YAAa,UAAW,CAAC,EACrE,wCAAsC,EACtC,2CAAyC,EACzC,gDAA8C,EAC9C,sDAAoD,CACtD,EACa,EACX,sFACW,EAAsB,GACjC,EAEW,EAAsB,CACjC,4CAA0C,CAAE,YAAa,QAAS,CAAC,EACnE,wCAAsC,EACtC,sDAAoD,CACtD,EACa,EACX,oFACW,EAAoB,GAC/B,C","file":"static/2426.75b31251.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\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([[3860],{3509:function(Le,Ie,j){j.d(Ie,{O:function(){return Y}});var ie=j(2784);function ue(J,ee){return typeof J=="function"?J(ee):J}var Se=j(29862);function ce(J){var ee=(0,ie.useState)(J),U=ee[0],de=ee[1],te=(0,Se.t)();return[U,(0,ie.useCallback)(function(me){te()&&de(me)},[])]}function Y(J){J===void 0&&(J=!1);var ee=ce(J),U=ee[0],de=ee[1];return[U,(0,ie.useCallback)(function(te){de(function(me){return typeof te=="undefined"?!me:Boolean(ue(te,me))})},[])]}},7688:function(Le,Ie,j){var ie=j(2784),ue=function(W,m){if(!(W instanceof m))throw new TypeError("Cannot call a class as a function")},Se=function(){function W(m,y){for(var z=0;z<y.length;z++){var w=y[z];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(m,w.key,w)}}return function(m,y,z){return y&&W(m.prototype,y),z&&W(m,z),m}}(),ce=Object.assign||function(W){for(var m=1;m<arguments.length;m++){var y=arguments[m];for(var z in y)Object.prototype.hasOwnProperty.call(y,z)&&(W[z]=y[z])}return W},Y=function(W,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);W.prototype=Object.create(m&&m.prototype,{constructor:{value:W,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(W,m):W.__proto__=m)},J=function(W,m){if(!W)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:W},ee=function(){function W(m,y){var z=[],w=!0,X=!1,P=void 0;try{for(var V=m[Symbol.iterator](),q;!(w=(q=V.next()).done)&&(z.push(q.value),!(y&&z.length===y));w=!0);}catch(K){X=!0,P=K}finally{try{!w&&V.return&&V.return()}finally{if(X)throw P}}return z}return function(m,y){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return W(m,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),U=void 0;typeof window!="undefined"?U=window:typeof self!="undefined"?U=self:U=j.g;var de=null,te=null,me=20,fe=U.clearTimeout,_e=U.setTimeout,ye=U.cancelAnimationFrame||U.mozCancelAnimationFrame||U.webkitCancelAnimationFrame,We=U.requestAnimationFrame||U.mozRequestAnimationFrame||U.webkitRequestAnimationFrame;ye==null||We==null?(de=fe,te=function(m){return _e(m,me)}):(de=function(m){var y=ee(m,2),z=y[0],w=y[1];ye(z),fe(w)},te=function(m){var y=We(function(){fe(z),m()}),z=_e(function(){ye(y),m()},me);return[y,z]});function Ne(W){var m=void 0,y=void 0,z=void 0,w=void 0,X=void 0,P=void 0,V=void 0,q=typeof document!="undefined"&&document.attachEvent;if(!q){P=function(h){var A=h.__resizeTriggers__,$=A.firstElementChild,Z=A.lastElementChild,pe=$.firstElementChild;Z.scrollLeft=Z.scrollWidth,Z.scrollTop=Z.scrollHeight,pe.style.width=$.offsetWidth+1+"px",pe.style.height=$.offsetHeight+1+"px",$.scrollLeft=$.scrollWidth,$.scrollTop=$.scrollHeight},X=function(h){return h.offsetWidth!==h.__resizeLast__.width||h.offsetHeight!==h.__resizeLast__.height},V=function(h){if(!(h.target.className&&typeof h.target.className.indexOf=="function"&&h.target.className.indexOf("contract-trigger")<0&&h.target.className.indexOf("expand-trigger")<0)){var A=this;P(this),this.__resizeRAF__&&de(this.__resizeRAF__),this.__resizeRAF__=te(function(){X(A)&&(A.__resizeLast__.width=A.offsetWidth,A.__resizeLast__.height=A.offsetHeight,A.__resizeListeners__.forEach(function(pe){pe.call(A,h)}))})}};var K=!1,oe="";z="animationstart";var ve="Webkit Moz O ms".split(" "),ge="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),re="";{var ae=document.createElement("fakeelement");if(ae.style.animationName!==void 0&&(K=!0),K===!1){for(var se=0;se<ve.length;se++)if(ae.style[ve[se]+"AnimationName"]!==void 0){re=ve[se],oe="-"+re.toLowerCase()+"-",z=ge[se],K=!0;break}}}y="resizeanim",m="@"+oe+"keyframes "+y+" { from { opacity: 0; } to { opacity: 0; } } ",w=oe+"animation: 1ms "+y+"; "}var we=function(h){if(!h.getElementById("detectElementResize")){var A=(m||"")+".resize-triggers { "+(w||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',$=h.head||h.getElementsByTagName("head")[0],Z=h.createElement("style");Z.id="detectElementResize",Z.type="text/css",W!=null&&Z.setAttribute("nonce",W),Z.styleSheet?Z.styleSheet.cssText=A:Z.appendChild(h.createTextNode(A)),$.appendChild(Z)}},Te=function(h,A){if(q)h.attachEvent("onresize",A);else{if(!h.__resizeTriggers__){var $=h.ownerDocument,Z=U.getComputedStyle(h);Z&&Z.position==="static"&&(h.style.position="relative"),we($),h.__resizeLast__={},h.__resizeListeners__=[],(h.__resizeTriggers__=$.createElement("div")).className="resize-triggers";var pe=$.createElement("div");pe.className="expand-trigger",pe.appendChild($.createElement("div"));var Ae=$.createElement("div");Ae.className="contract-trigger",h.__resizeTriggers__.appendChild(pe),h.__resizeTriggers__.appendChild(Ae),h.appendChild(h.__resizeTriggers__),P(h),h.addEventListener("scroll",V,!0),z&&(h.__resizeTriggers__.__animationListener__=function(Oe){Oe.animationName===y&&P(h)},h.__resizeTriggers__.addEventListener(z,h.__resizeTriggers__.__animationListener__))}h.__resizeListeners__.push(A)}},Re=function(h,A){if(q)h.detachEvent("onresize",A);else if(h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(A),1),!h.__resizeListeners__.length){h.removeEventListener("scroll",V,!0),h.__resizeTriggers__.__animationListener__&&(h.__resizeTriggers__.removeEventListener(z,h.__resizeTriggers__.__animationListener__),h.__resizeTriggers__.__animationListener__=null);try{h.__resizeTriggers__=!h.removeChild(h.__resizeTriggers__)}catch{}}};return{addResizeListener:Te,removeResizeListener:Re}}var Fe=function(W){Y(m,W);function m(){var y,z,w,X;ue(this,m);for(var P=arguments.length,V=Array(P),q=0;q<P;q++)V[q]=arguments[q];return X=(z=(w=J(this,(y=m.__proto__||Object.getPrototypeOf(m)).call.apply(y,[this].concat(V))),w),w.state={height:w.props.defaultHeight||0,width:w.props.defaultWidth||0},w._onResize=function(){var K=w.props,oe=K.disableHeight,ve=K.disableWidth,ge=K.onResize;if(w._parentNode){var re=w._parentNode.offsetHeight||0,ae=w._parentNode.offsetWidth||0,se=window.getComputedStyle(w._parentNode)||{},we=parseInt(se.paddingLeft,10)||0,Te=parseInt(se.paddingRight,10)||0,Re=parseInt(se.paddingTop,10)||0,G=parseInt(se.paddingBottom,10)||0,h=re-Re-G,A=ae-we-Te;(!oe&&w.state.height!==h||!ve&&w.state.width!==A)&&(w.setState({height:re-Re-G,width:ae-we-Te}),ge({height:re,width:ae}))}},w._setRef=function(K){w._autoSizer=K},z),J(w,X)}return Se(m,[{key:"componentDidMount",value:function(){var z=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=Ne(z),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var z=this.props,w=z.children,X=z.className,P=z.disableHeight,V=z.disableWidth,q=z.style,K=this.state,oe=K.height,ve=K.width,ge={overflow:"visible"},re={},ae=!1;return P||(oe===0&&(ae=!0),ge.height=0,re.height=oe),V||(ve===0&&(ae=!0),ge.width=0,re.width=ve),(0,ie.createElement)("div",{className:X,ref:this._setRef,style:ce({},ge,q)},!ae&&w(re))}}]),m}(ie.PureComponent);Fe.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}},Ie.Z=Fe},50166:function(Le,Ie,j){j.d(Ie,{t7:function(){return De}});var ie=j(7896),ue=j(80753),Se=j(81665),ce=j(36631),Y=j(2784),J=typeof performance=="object"&&typeof performance.now=="function",ee=J?function(){return performance.now()}:function(){return Date.now()};function U(a){cancelAnimationFrame(a.id)}function de(a,e){var t=ee();function r(){ee()-t>=e?a.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var te=-1;function me(a){if(a===void 0&&(a=!1),te===-1||a){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(e),te=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return te}var fe=null;function _e(a){if(a===void 0&&(a=!1),fe===null||a){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?fe="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?fe="negative":fe="positive-ascending"),document.body.removeChild(e),fe}return fe}var ye=150,We=function(e){var t=e.columnIndex,r=e.data,i=e.rowIndex;return i+":"+t},Ne=null,Fe=null,W=null;function m(a){var e,t=a.getColumnOffset,r=a.getColumnStartIndexForOffset,i=a.getColumnStopIndexForStartIndex,l=a.getColumnWidth,s=a.getEstimatedTotalHeight,u=a.getEstimatedTotalWidth,c=a.getOffsetForColumnAndAlignment,p=a.getOffsetForRowAndAlignment,g=a.getRowHeight,I=a.getRowOffset,v=a.getRowStartIndexForOffset,b=a.getRowStopIndexForStartIndex,L=a.initInstanceProps,o=a.shouldResetStyleCacheOnItemSizeChange,S=a.validateProps;return e=function(M){(0,Se.Z)(R,M);function R(O){var n;return n=M.call(this,O)||this,n._instanceProps=L(n.props,(0,ue.Z)(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:(0,ue.Z)(n),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:typeof n.props.initialScrollLeft=="number"?n.props.initialScrollLeft:0,scrollTop:typeof n.props.initialScrollTop=="number"?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=(0,ce.Z)(function(f,d,_,x,C,E,N,k){return n.props.onItemsRendered({overscanColumnStartIndex:f,overscanColumnStopIndex:d,overscanRowStartIndex:_,overscanRowStopIndex:x,visibleColumnStartIndex:C,visibleColumnStopIndex:E,visibleRowStartIndex:N,visibleRowStopIndex:k})}),n._callOnScroll=void 0,n._callOnScroll=(0,ce.Z)(function(f,d,_,x,C){return n.props.onScroll({horizontalScrollDirection:_,scrollLeft:f,scrollTop:d,verticalScrollDirection:x,scrollUpdateWasRequested:C})}),n._getItemStyle=void 0,n._getItemStyle=function(f,d){var _=n.props,x=_.columnWidth,C=_.direction,E=_.rowHeight,N=n._getItemStyleCache(o&&x,o&&C,o&&E),k=f+":"+d,D;if(N.hasOwnProperty(k))D=N[k];else{var H=t(n.props,d,n._instanceProps),F=C==="rtl";N[k]=D={position:"absolute",left:F?void 0:H,right:F?H:void 0,top:I(n.props,f,n._instanceProps),height:g(n.props,f,n._instanceProps),width:l(n.props,d,n._instanceProps)}}return D},n._getItemStyleCache=void 0,n._getItemStyleCache=(0,ce.Z)(function(f,d,_){return{}}),n._onScroll=function(f){var d=f.currentTarget,_=d.clientHeight,x=d.clientWidth,C=d.scrollLeft,E=d.scrollTop,N=d.scrollHeight,k=d.scrollWidth;n.setState(function(D){if(D.scrollLeft===C&&D.scrollTop===E)return null;var H=n.props.direction,F=C;if(H==="rtl")switch(_e()){case"negative":F=-C;break;case"positive-descending":F=k-x-C;break}F=Math.max(0,Math.min(F,k-x));var B=Math.max(0,Math.min(E,N-_));return{isScrolling:!0,horizontalScrollDirection:D.scrollLeft<C?"forward":"backward",scrollLeft:F,scrollTop:B,verticalScrollDirection:D.scrollTop<E?"forward":"backward",scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(f){var d=n.props.outerRef;n._outerRef=f,typeof d=="function"?d(f):d!=null&&typeof d=="object"&&d.hasOwnProperty("current")&&(d.current=f)},n._resetIsScrollingDebounced=function(){n._resetIsScrollingTimeoutId!==null&&U(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=de(n._resetIsScrolling,ye)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1)})},n}R.getDerivedStateFromProps=function(n,f){return y(n,f),S(n),null};var T=R.prototype;return T.scrollTo=function(n){var f=n.scrollLeft,d=n.scrollTop;f!==void 0&&(f=Math.max(0,f)),d!==void 0&&(d=Math.max(0,d)),this.setState(function(_){return f===void 0&&(f=_.scrollLeft),d===void 0&&(d=_.scrollTop),_.scrollLeft===f&&_.scrollTop===d?null:{horizontalScrollDirection:_.scrollLeft<f?"forward":"backward",scrollLeft:f,scrollTop:d,scrollUpdateWasRequested:!0,verticalScrollDirection:_.scrollTop<d?"forward":"backward"}},this._resetIsScrollingDebounced)},T.scrollToItem=function(n){var f=n.align,d=f===void 0?"auto":f,_=n.columnIndex,x=n.rowIndex,C=this.props,E=C.columnCount,N=C.height,k=C.rowCount,D=C.width,H=this.state,F=H.scrollLeft,B=H.scrollTop,Q=me();_!==void 0&&(_=Math.max(0,Math.min(_,E-1))),x!==void 0&&(x=Math.max(0,Math.min(x,k-1)));var le=s(this.props,this._instanceProps),ne=u(this.props,this._instanceProps),Ce=ne>D?Q:0,Me=le>N?Q:0;this.scrollTo({scrollLeft:_!==void 0?c(this.props,_,d,F,this._instanceProps,Me):F,scrollTop:x!==void 0?p(this.props,x,d,B,this._instanceProps,Ce):B})},T.componentDidMount=function(){var n=this.props,f=n.initialScrollLeft,d=n.initialScrollTop;if(this._outerRef!=null){var _=this._outerRef;typeof f=="number"&&(_.scrollLeft=f),typeof d=="number"&&(_.scrollTop=d)}this._callPropsCallbacks()},T.componentDidUpdate=function(){var n=this.props.direction,f=this.state,d=f.scrollLeft,_=f.scrollTop,x=f.scrollUpdateWasRequested;if(x&&this._outerRef!=null){var C=this._outerRef;if(n==="rtl")switch(_e()){case"negative":C.scrollLeft=-d;break;case"positive-ascending":C.scrollLeft=d;break;default:var E=C.clientWidth,N=C.scrollWidth;C.scrollLeft=N-E-d;break}else C.scrollLeft=Math.max(0,d);C.scrollTop=Math.max(0,_)}this._callPropsCallbacks()},T.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&U(this._resetIsScrollingTimeoutId)},T.render=function(){var n=this.props,f=n.children,d=n.className,_=n.columnCount,x=n.direction,C=n.height,E=n.innerRef,N=n.innerElementType,k=n.innerTagName,D=n.itemData,H=n.itemKey,F=H===void 0?We:H,B=n.outerElementType,Q=n.outerTagName,le=n.rowCount,ne=n.style,Ce=n.useIsScrolling,Me=n.width,ze=this.state.isScrolling,he=this._getHorizontalRangeToRender(),xe=he[0],Ze=he[1],He=this._getVerticalRangeToRender(),Be=He[0],qe=He[1],Pe=[];if(_>0&&le)for(var be=Be;be<=qe;be++)for(var Ee=xe;Ee<=Ze;Ee++)Pe.push((0,Y.createElement)(f,{columnIndex:Ee,data:D,isScrolling:Ce?ze:void 0,key:F({columnIndex:Ee,data:D,rowIndex:be}),rowIndex:be,style:this._getItemStyle(be,Ee)}));var Ke=s(this.props,this._instanceProps),je=u(this.props,this._instanceProps);return(0,Y.createElement)(B||Q||"div",{className:d,onScroll:this._onScroll,ref:this._outerRefSetter,style:(0,ie.Z)({position:"relative",height:C,width:Me,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:x},ne)},(0,Y.createElement)(N||k||"div",{children:Pe,ref:E,style:{height:Ke,pointerEvents:ze?"none":void 0,width:je}}))},T._callPropsCallbacks=function(){var n=this.props,f=n.columnCount,d=n.onItemsRendered,_=n.onScroll,x=n.rowCount;if(typeof d=="function"&&f>0&&x>0){var C=this._getHorizontalRangeToRender(),E=C[0],N=C[1],k=C[2],D=C[3],H=this._getVerticalRangeToRender(),F=H[0],B=H[1],Q=H[2],le=H[3];this._callOnItemsRendered(E,N,F,B,k,D,Q,le)}if(typeof _=="function"){var ne=this.state,Ce=ne.horizontalScrollDirection,Me=ne.scrollLeft,ze=ne.scrollTop,he=ne.scrollUpdateWasRequested,xe=ne.verticalScrollDirection;this._callOnScroll(Me,ze,Ce,xe,he)}},T._getHorizontalRangeToRender=function(){var n=this.props,f=n.columnCount,d=n.overscanColumnCount,_=n.overscanColumnsCount,x=n.overscanCount,C=n.rowCount,E=this.state,N=E.horizontalScrollDirection,k=E.isScrolling,D=E.scrollLeft,H=d||_||x||1;if(f===0||C===0)return[0,0,0,0];var F=r(this.props,D,this._instanceProps),B=i(this.props,F,D,this._instanceProps),Q=!k||N==="backward"?Math.max(1,H):1,le=!k||N==="forward"?Math.max(1,H):1;return[Math.max(0,F-Q),Math.max(0,Math.min(f-1,B+le)),F,B]},T._getVerticalRangeToRender=function(){var n=this.props,f=n.columnCount,d=n.overscanCount,_=n.overscanRowCount,x=n.overscanRowsCount,C=n.rowCount,E=this.state,N=E.isScrolling,k=E.verticalScrollDirection,D=E.scrollTop,H=_||x||d||1;if(f===0||C===0)return[0,0,0,0];var F=v(this.props,D,this._instanceProps),B=b(this.props,F,D,this._instanceProps),Q=!N||k==="backward"?Math.max(1,H):1,le=!N||k==="forward"?Math.max(1,H):1;return[Math.max(0,F-Q),Math.max(0,Math.min(C-1,B+le)),F,B]},R}(Y.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},e}var y=function(e,t){var r=e.children,i=e.direction,l=e.height,s=e.innerTagName,u=e.outerTagName,c=e.overscanColumnsCount,p=e.overscanCount,g=e.overscanRowsCount,I=e.width,v=t.instance},z=50,w=function(e,t){var r=e.rowCount,i=t.rowMetadataMap,l=t.estimatedRowHeight,s=t.lastMeasuredRowIndex,u=0;if(s>=r&&(s=r-1),s>=0){var c=i[s];u=c.offset+c.size}var p=r-s-1,g=p*l;return u+g},X=function(e,t){var r=e.columnCount,i=t.columnMetadataMap,l=t.estimatedColumnWidth,s=t.lastMeasuredColumnIndex,u=0;if(s>=r&&(s=r-1),s>=0){var c=i[s];u=c.offset+c.size}var p=r-s-1,g=p*l;return u+g},P=function(e,t,r,i){var l,s,u;if(e==="column"?(l=i.columnMetadataMap,s=t.columnWidth,u=i.lastMeasuredColumnIndex):(l=i.rowMetadataMap,s=t.rowHeight,u=i.lastMeasuredRowIndex),r>u){var c=0;if(u>=0){var p=l[u];c=p.offset+p.size}for(var g=u+1;g<=r;g++){var I=s(g);l[g]={offset:c,size:I},c+=I}e==="column"?i.lastMeasuredColumnIndex=r:i.lastMeasuredRowIndex=r}return l[r]},V=function(e,t,r,i){var l,s;e==="column"?(l=r.columnMetadataMap,s=r.lastMeasuredColumnIndex):(l=r.rowMetadataMap,s=r.lastMeasuredRowIndex);var u=s>0?l[s].offset:0;return u>=i?q(e,t,r,s,0,i):K(e,t,r,Math.max(0,s),i)},q=function(e,t,r,i,l,s){for(;l<=i;){var u=l+Math.floor((i-l)/2),c=P(e,t,u,r).offset;if(c===s)return u;c<s?l=u+1:c>s&&(i=u-1)}return l>0?l-1:0},K=function(e,t,r,i,l){for(var s=e==="column"?t.columnCount:t.rowCount,u=1;i<s&&P(e,t,i,r).offset<l;)i+=u,u*=2;return q(e,t,r,Math.min(i,s-1),Math.floor(i/2),l)},oe=function(e,t,r,i,l,s,u){var c=e==="column"?t.width:t.height,p=P(e,t,r,s),g=e==="column"?X(t,s):w(t,s),I=Math.max(0,Math.min(g-c,p.offset)),v=Math.max(0,p.offset-c+u+p.size);switch(i==="smart"&&(l>=v-c&&l<=I+c?i="auto":i="center"),i){case"start":return I;case"end":return v;case"center":return Math.round(v+(I-v)/2);case"auto":default:return l>=v&&l<=I?l:v>I||l<v?v:I}},ve=m({getColumnOffset:function(e,t,r){return P("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return V("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,i){for(var l=e.columnCount,s=e.width,u=P("column",e,t,i),c=r+s,p=u.offset+u.size,g=t;g<l-1&&p<c;)g++,p+=P("column",e,g,i).size;return g},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:w,getEstimatedTotalWidth:X,getOffsetForColumnAndAlignment:function(e,t,r,i,l,s){return oe("column",e,t,r,i,l,s)},getOffsetForRowAndAlignment:function(e,t,r,i,l,s){return oe("row",e,t,r,i,l,s)},getRowOffset:function(e,t,r){return P("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return V("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,i){for(var l=e.rowCount,s=e.height,u=P("row",e,t,i),c=r+s,p=u.offset+u.size,g=t;g<l-1&&p<c;)g++,p+=P("row",e,g,i).size;return g},initInstanceProps:function(e,t){var r=e,i=r.estimatedColumnWidth,l=r.estimatedRowHeight,s={columnMetadataMap:{},estimatedColumnWidth:i||z,estimatedRowHeight:l||z,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(u,c){c===void 0&&(c=!0),t.resetAfterIndices({columnIndex:u,shouldForceUpdate:c})},t.resetAfterRowIndex=function(u,c){c===void 0&&(c=!0),t.resetAfterIndices({rowIndex:u,shouldForceUpdate:c})},t.resetAfterIndices=function(u){var c=u.columnIndex,p=u.rowIndex,g=u.shouldForceUpdate,I=g===void 0?!0:g;typeof c=="number"&&(s.lastMeasuredColumnIndex=Math.min(s.lastMeasuredColumnIndex,c-1)),typeof p=="number"&&(s.lastMeasuredRowIndex=Math.min(s.lastMeasuredRowIndex,p-1)),t._getItemStyleCache(-1),I&&t.forceUpdate()},s},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){var t=e.columnWidth,r=e.rowHeight}}),ge=150,re=function(e,t){return e},ae=null,se=null;function we(a){var e,t=a.getItemOffset,r=a.getEstimatedTotalSize,i=a.getItemSize,l=a.getOffsetForIndexAndAlignment,s=a.getStartIndexForOffset,u=a.getStopIndexForStartIndex,c=a.initInstanceProps,p=a.shouldResetStyleCacheOnItemSizeChange,g=a.validateProps;return e=function(I){(0,Se.Z)(v,I);function v(L){var o;return o=I.call(this,L)||this,o._instanceProps=c(o.props,(0,ue.Z)(o)),o._outerRef=void 0,o._resetIsScrollingTimeoutId=null,o.state={instance:(0,ue.Z)(o),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof o.props.initialScrollOffset=="number"?o.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},o._callOnItemsRendered=void 0,o._callOnItemsRendered=(0,ce.Z)(function(S,M,R,T){return o.props.onItemsRendered({overscanStartIndex:S,overscanStopIndex:M,visibleStartIndex:R,visibleStopIndex:T})}),o._callOnScroll=void 0,o._callOnScroll=(0,ce.Z)(function(S,M,R){return o.props.onScroll({scrollDirection:S,scrollOffset:M,scrollUpdateWasRequested:R})}),o._getItemStyle=void 0,o._getItemStyle=function(S){var M=o.props,R=M.direction,T=M.itemSize,O=M.layout,n=o._getItemStyleCache(p&&T,p&&O,p&&R),f;if(n.hasOwnProperty(S))f=n[S];else{var d=t(o.props,S,o._instanceProps),_=i(o.props,S,o._instanceProps),x=R==="horizontal"||O==="horizontal",C=R==="rtl",E=x?d:0;n[S]=f={position:"absolute",left:C?void 0:E,right:C?E:void 0,top:x?0:d,height:x?"100%":_,width:x?_:"100%"}}return f},o._getItemStyleCache=void 0,o._getItemStyleCache=(0,ce.Z)(function(S,M,R){return{}}),o._onScrollHorizontal=function(S){var M=S.currentTarget,R=M.clientWidth,T=M.scrollLeft,O=M.scrollWidth;o.setState(function(n){if(n.scrollOffset===T)return null;var f=o.props.direction,d=T;if(f==="rtl")switch(_e()){case"negative":d=-T;break;case"positive-descending":d=O-R-T;break}return d=Math.max(0,Math.min(d,O-R)),{isScrolling:!0,scrollDirection:n.scrollOffset<T?"forward":"backward",scrollOffset:d,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._onScrollVertical=function(S){var M=S.currentTarget,R=M.clientHeight,T=M.scrollHeight,O=M.scrollTop;o.setState(function(n){if(n.scrollOffset===O)return null;var f=Math.max(0,Math.min(O,T-R));return{isScrolling:!0,scrollDirection:n.scrollOffset<f?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._outerRefSetter=function(S){var M=o.props.outerRef;o._outerRef=S,typeof M=="function"?M(S):M!=null&&typeof M=="object"&&M.hasOwnProperty("current")&&(M.current=S)},o._resetIsScrollingDebounced=function(){o._resetIsScrollingTimeoutId!==null&&U(o._resetIsScrollingTimeoutId),o._resetIsScrollingTimeoutId=de(o._resetIsScrolling,ge)},o._resetIsScrolling=function(){o._resetIsScrollingTimeoutId=null,o.setState({isScrolling:!1},function(){o._getItemStyleCache(-1,null)})},o}v.getDerivedStateFromProps=function(o,S){return Te(o,S),g(o),null};var b=v.prototype;return b.scrollTo=function(o){o=Math.max(0,o),this.setState(function(S){return S.scrollOffset===o?null:{scrollDirection:S.scrollOffset<o?"forward":"backward",scrollOffset:o,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},b.scrollToItem=function(o,S){S===void 0&&(S="auto");var M=this.props.itemCount,R=this.state.scrollOffset;o=Math.max(0,Math.min(o,M-1)),this.scrollTo(l(this.props,o,S,R,this._instanceProps))},b.componentDidMount=function(){var o=this.props,S=o.direction,M=o.initialScrollOffset,R=o.layout;if(typeof M=="number"&&this._outerRef!=null){var T=this._outerRef;S==="horizontal"||R==="horizontal"?T.scrollLeft=M:T.scrollTop=M}this._callPropsCallbacks()},b.componentDidUpdate=function(){var o=this.props,S=o.direction,M=o.layout,R=this.state,T=R.scrollOffset,O=R.scrollUpdateWasRequested;if(O&&this._outerRef!=null){var n=this._outerRef;if(S==="horizontal"||M==="horizontal")if(S==="rtl")switch(_e()){case"negative":n.scrollLeft=-T;break;case"positive-ascending":n.scrollLeft=T;break;default:var f=n.clientWidth,d=n.scrollWidth;n.scrollLeft=d-f-T;break}else n.scrollLeft=T;else n.scrollTop=T}this._callPropsCallbacks()},b.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&U(this._resetIsScrollingTimeoutId)},b.render=function(){var o=this.props,S=o.children,M=o.className,R=o.direction,T=o.height,O=o.innerRef,n=o.innerElementType,f=o.innerTagName,d=o.itemCount,_=o.itemData,x=o.itemKey,C=x===void 0?re:x,E=o.layout,N=o.outerElementType,k=o.outerTagName,D=o.style,H=o.useIsScrolling,F=o.width,B=this.state.isScrolling,Q=R==="horizontal"||E==="horizontal",le=Q?this._onScrollHorizontal:this._onScrollVertical,ne=this._getRangeToRender(),Ce=ne[0],Me=ne[1],ze=[];if(d>0)for(var he=Ce;he<=Me;he++)ze.push((0,Y.createElement)(S,{data:_,key:C(he,_),index:he,isScrolling:H?B:void 0,style:this._getItemStyle(he)}));var xe=r(this.props,this._instanceProps);return(0,Y.createElement)(N||k||"div",{className:M,onScroll:le,ref:this._outerRefSetter,style:(0,ie.Z)({position:"relative",height:T,width:F,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:R},D)},(0,Y.createElement)(n||f||"div",{children:ze,ref:O,style:{height:Q?"100%":xe,pointerEvents:B?"none":void 0,width:Q?xe:"100%"}}))},b._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var o=this.props.itemCount;if(o>0){var S=this._getRangeToRender(),M=S[0],R=S[1],T=S[2],O=S[3];this._callOnItemsRendered(M,R,T,O)}}if(typeof this.props.onScroll=="function"){var n=this.state,f=n.scrollDirection,d=n.scrollOffset,_=n.scrollUpdateWasRequested;this._callOnScroll(f,d,_)}},b._getRangeToRender=function(){var o=this.props,S=o.itemCount,M=o.overscanCount,R=this.state,T=R.isScrolling,O=R.scrollDirection,n=R.scrollOffset;if(S===0)return[0,0,0,0];var f=s(this.props,n,this._instanceProps),d=u(this.props,f,n,this._instanceProps),_=!T||O==="backward"?Math.max(1,M):1,x=!T||O==="forward"?Math.max(1,M):1;return[Math.max(0,f-_),Math.max(0,Math.min(S-1,d+x)),f,d]},v}(Y.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var Te=function(e,t){var r=e.children,i=e.direction,l=e.height,s=e.layout,u=e.innerTagName,c=e.outerTagName,p=e.width,g=t.instance;if(!1)var I},Re=50,G=function(e,t,r){var i=e,l=i.itemSize,s=r.itemMetadataMap,u=r.lastMeasuredIndex;if(t>u){var c=0;if(u>=0){var p=s[u];c=p.offset+p.size}for(var g=u+1;g<=t;g++){var I=l(g);s[g]={offset:c,size:I},c+=I}r.lastMeasuredIndex=t}return s[t]},h=function(e,t,r){var i=t.itemMetadataMap,l=t.lastMeasuredIndex,s=l>0?i[l].offset:0;return s>=r?A(e,t,l,0,r):$(e,t,Math.max(0,l),r)},A=function(e,t,r,i,l){for(;i<=r;){var s=i+Math.floor((r-i)/2),u=G(e,s,t).offset;if(u===l)return s;u<l?i=s+1:u>l&&(r=s-1)}return i>0?i-1:0},$=function(e,t,r,i){for(var l=e.itemCount,s=1;r<l&&G(e,r,t).offset<i;)r+=s,s*=2;return A(e,t,Math.min(r,l-1),Math.floor(r/2),i)},Z=function(e,t){var r=e.itemCount,i=t.itemMetadataMap,l=t.estimatedItemSize,s=t.lastMeasuredIndex,u=0;if(s>=r&&(s=r-1),s>=0){var c=i[s];u=c.offset+c.size}var p=r-s-1,g=p*l;return u+g},pe=we({getItemOffset:function(e,t,r){return G(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:Z,getOffsetForIndexAndAlignment:function(e,t,r,i,l){var s=e.direction,u=e.height,c=e.layout,p=e.width,g=s==="horizontal"||c==="horizontal",I=g?p:u,v=G(e,t,l),b=Z(e,l),L=Math.max(0,Math.min(b-I,v.offset)),o=Math.max(0,v.offset-I+v.size);switch(r==="smart"&&(i>=o-I&&i<=L+I?r="auto":r="center"),r){case"start":return L;case"end":return o;case"center":return Math.round(o+(L-o)/2);case"auto":default:return i>=o&&i<=L?i:i<o?o:L}},getStartIndexForOffset:function(e,t,r){return h(e,r,t)},getStopIndexForStartIndex:function(e,t,r,i){for(var l=e.direction,s=e.height,u=e.itemCount,c=e.layout,p=e.width,g=l==="horizontal"||c==="horizontal",I=g?p:s,v=G(e,t,i),b=r+I,L=v.offset+v.size,o=t;o<u-1&&L<b;)o++,L+=G(e,o,i).size;return o},initInstanceProps:function(e,t){var r=e,i=r.estimatedItemSize,l={itemMetadataMap:{},estimatedItemSize:i||Re,lastMeasuredIndex:-1};return t.resetAfterIndex=function(s,u){u===void 0&&(u=!0),l.lastMeasuredIndex=Math.min(l.lastMeasuredIndex,s-1),t._getItemStyleCache(-1),u&&t.forceUpdate()},l},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){var t=e.itemSize}}),Ae=m({getColumnOffset:function(e,t){var r=e.columnWidth;return t*r},getColumnWidth:function(e,t){var r=e.columnWidth;return r},getRowOffset:function(e,t){var r=e.rowHeight;return t*r},getRowHeight:function(e,t){var r=e.rowHeight;return r},getEstimatedTotalHeight:function(e){var t=e.rowCount,r=e.rowHeight;return r*t},getEstimatedTotalWidth:function(e){var t=e.columnCount,r=e.columnWidth;return r*t},getOffsetForColumnAndAlignment:function(e,t,r,i,l,s){var u=e.columnCount,c=e.columnWidth,p=e.width,g=Math.max(0,u*c-p),I=Math.min(g,t*c),v=Math.max(0,t*c-p+s+c);switch(r==="smart"&&(i>=v-p&&i<=I+p?r="auto":r="center"),r){case"start":return I;case"end":return v;case"center":var b=Math.round(v+(I-v)/2);return b<Math.ceil(p/2)?0:b>g+Math.floor(p/2)?g:b;case"auto":default:return i>=v&&i<=I?i:v>I||i<v?v:I}},getOffsetForRowAndAlignment:function(e,t,r,i,l,s){var u=e.rowHeight,c=e.height,p=e.rowCount,g=Math.max(0,p*u-c),I=Math.min(g,t*u),v=Math.max(0,t*u-c+s+u);switch(r==="smart"&&(i>=v-c&&i<=I+c?r="auto":r="center"),r){case"start":return I;case"end":return v;case"center":var b=Math.round(v+(I-v)/2);return b<Math.ceil(c/2)?0:b>g+Math.floor(c/2)?g:b;case"auto":default:return i>=v&&i<=I?i:v>I||i<v?v:I}},getColumnStartIndexForOffset:function(e,t){var r=e.columnWidth,i=e.columnCount;return Math.max(0,Math.min(i-1,Math.floor(t/r)))},getColumnStopIndexForStartIndex:function(e,t,r){var i=e.columnWidth,l=e.columnCount,s=e.width,u=t*i,c=Math.ceil((s+r-u)/i);return Math.max(0,Math.min(l-1,t+c-1))},getRowStartIndexForOffset:function(e,t){var r=e.rowHeight,i=e.rowCount;return Math.max(0,Math.min(i-1,Math.floor(t/r)))},getRowStopIndexForStartIndex:function(e,t,r){var i=e.rowHeight,l=e.rowCount,s=e.height,u=t*i,c=Math.ceil((s+r-u)/i);return Math.max(0,Math.min(l-1,t+c-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var t=e.columnWidth,r=e.rowHeight}}),De=we({getItemOffset:function(e,t){var r=e.itemSize;return t*r},getItemSize:function(e,t){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var t=e.itemCount,r=e.itemSize;return r*t},getOffsetForIndexAndAlignment:function(e,t,r,i){var l=e.direction,s=e.height,u=e.itemCount,c=e.itemSize,p=e.layout,g=e.width,I=l==="horizontal"||p==="horizontal",v=I?g:s,b=Math.max(0,u*c-v),L=Math.min(b,t*c),o=Math.max(0,t*c-v+c);switch(r==="smart"&&(i>=o-v&&i<=L+v?r="auto":r="center"),r){case"start":return L;case"end":return o;case"center":{var S=Math.round(o+(L-o)/2);return S<Math.ceil(v/2)?0:S>b+Math.floor(v/2)?b:S}case"auto":default:return i>=o&&i<=L?i:i<o?o:L}},getStartIndexForOffset:function(e,t){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(t/i)))},getStopIndexForStartIndex:function(e,t,r){var i=e.direction,l=e.height,s=e.itemCount,u=e.itemSize,c=e.layout,p=e.width,g=i==="horizontal"||c==="horizontal",I=t*u,v=g?p:l,b=Math.ceil((v+r-I)/u);return Math.max(0,Math.min(s-1,t+b-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var t=e.itemSize}});function Oe(a,e){for(var t in a)if(!(t in e))return!0;for(var r in e)if(a[r]!==e[r])return!0;return!1}var ke=null,Ue=null;function $e(a,e){var t=a.style,r=_objectWithoutPropertiesLoose(a,ke),i=e.style,l=_objectWithoutPropertiesLoose(e,Ue);return!Oe(t,i)&&!Oe(r,l)}function Ve(a,e){return!$e(this.props,a)||Oe(this.state,e)}},4903:function(Le,Ie,j){j.d(Ie,{Z:function(){return ie}});function ie({onlyFirst:ue=!1}={}){const Se=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(Se,ue?void 0:"g")}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=3860.8a0dac3d.chunk.js.map
|