@techdocs/cli 1.2.4-next.1 → 1.2.4-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/mkdocsServer-99ec8af2.cjs.js.map +1 -1
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/{1032.eb3b9695.chunk.js → 1032.1b3a9ba2.chunk.js} +2 -2
  5. package/dist/embedded-app/static/{1032.eb3b9695.chunk.js.map → 1032.1b3a9ba2.chunk.js.map} +1 -1
  6. package/dist/embedded-app/static/{1105.40283456.chunk.js → 1105.b781a27e.chunk.js} +2 -2
  7. package/dist/embedded-app/static/{1105.40283456.chunk.js.map → 1105.b781a27e.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/{184.1cc84853.chunk.js → 184.e3627fff.chunk.js} +2 -2
  9. package/dist/embedded-app/static/{184.1cc84853.chunk.js.map → 184.e3627fff.chunk.js.map} +1 -1
  10. package/dist/embedded-app/static/{2440.99fc794a.chunk.js → 2440.22336cc5.chunk.js} +2 -2
  11. package/dist/embedded-app/static/{2440.99fc794a.chunk.js.map → 2440.22336cc5.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/{5458.c2cfc48a.chunk.js → 5458.4bf58a1b.chunk.js} +2 -2
  13. package/dist/embedded-app/static/{5458.c2cfc48a.chunk.js.map → 5458.4bf58a1b.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/5837.c94ef7e1.chunk.js +3 -0
  15. package/dist/embedded-app/static/5837.c94ef7e1.chunk.js.map +1 -0
  16. package/dist/embedded-app/static/5869.4dc32277.chunk.js +3 -0
  17. package/dist/embedded-app/static/5869.4dc32277.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/6051.be13f244.chunk.js +4 -0
  19. package/dist/embedded-app/static/6051.be13f244.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/{732.426f89e4.chunk.js → 732.8d78661a.chunk.js} +2 -2
  21. package/dist/embedded-app/static/{732.426f89e4.chunk.js.map → 732.8d78661a.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/{7560.a50a4f27.chunk.js → 7560.2425fb06.chunk.js} +2 -2
  23. package/dist/embedded-app/static/{7560.a50a4f27.chunk.js.map → 7560.2425fb06.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/{7750.36f3b714.chunk.js → 7750.b05dca8b.chunk.js} +2 -2
  25. package/dist/embedded-app/static/{7750.36f3b714.chunk.js.map → 7750.b05dca8b.chunk.js.map} +1 -1
  26. package/dist/embedded-app/static/{8951.131e35ed.chunk.js → 8951.4ac24e92.chunk.js} +2 -2
  27. package/dist/embedded-app/static/{8951.131e35ed.chunk.js.map → 8951.4ac24e92.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/{9545.59bf7391.chunk.js → 9545.c7c7af3a.chunk.js} +2 -2
  29. package/dist/embedded-app/static/{9545.59bf7391.chunk.js.map → 9545.c7c7af3a.chunk.js.map} +1 -1
  30. package/dist/embedded-app/static/{9770.ae81d806.chunk.js → 9770.b9b07a81.chunk.js} +2 -2
  31. package/dist/embedded-app/static/{9770.ae81d806.chunk.js.map → 9770.b9b07a81.chunk.js.map} +1 -1
  32. package/dist/embedded-app/static/main.11a8d7f1.js +494 -0
  33. package/dist/embedded-app/static/main.11a8d7f1.js.map +1 -0
  34. package/dist/embedded-app/static/{module-lodash.0cada415.js → module-lodash.f07e54c1.js} +2 -2
  35. package/dist/embedded-app/static/module-lodash.f07e54c1.js.map +1 -0
  36. package/dist/embedded-app/static/module-remix-run.ed639a8d.js +12 -0
  37. package/dist/embedded-app/static/module-remix-run.ed639a8d.js.map +1 -0
  38. package/dist/embedded-app/static/{runtime.8e467e32.js → runtime.11a8d7f1.js} +2 -2
  39. package/dist/embedded-app/static/{runtime.8e467e32.js.map → runtime.11a8d7f1.js.map} +1 -1
  40. package/dist/embedded-app/static/vendor.11a8d7f1.js +236 -0
  41. package/dist/embedded-app/static/vendor.11a8d7f1.js.map +1 -0
  42. package/dist/index.cjs.js +1 -1
  43. package/package.json +5 -5
  44. package/dist/embedded-app/static/5837.f53a69b0.chunk.js +0 -3
  45. package/dist/embedded-app/static/5837.f53a69b0.chunk.js.map +0 -1
  46. package/dist/embedded-app/static/5869.b44bf631.chunk.js +0 -3
  47. package/dist/embedded-app/static/5869.b44bf631.chunk.js.map +0 -1
  48. package/dist/embedded-app/static/6051.d2e9db23.chunk.js +0 -4
  49. package/dist/embedded-app/static/6051.d2e9db23.chunk.js.map +0 -1
  50. package/dist/embedded-app/static/main.8e467e32.js +0 -494
  51. package/dist/embedded-app/static/main.8e467e32.js.map +0 -1
  52. package/dist/embedded-app/static/module-lodash.0cada415.js.map +0 -1
  53. package/dist/embedded-app/static/module-remix-run.df834241.js +0 -12
  54. package/dist/embedded-app/static/module-remix-run.df834241.js.map +0 -1
  55. package/dist/embedded-app/static/vendor.8e467e32.js +0 -236
  56. package/dist/embedded-app/static/vendor.8e467e32.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @techdocs/cli
2
2
 
3
+ ## 1.2.4-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8015ff1258: Tweaked wording to use inclusive terminology
8
+ - Updated dependencies
9
+ - @backstage/backend-common@0.17.0-next.2
10
+ - @backstage/cli-common@0.1.11-next.0
11
+ - @backstage/plugin-techdocs-node@1.4.3-next.2
12
+ - @backstage/catalog-model@1.1.4-next.1
13
+ - @backstage/config@1.0.5-next.1
14
+
3
15
  ## 1.2.4-next.1
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"mkdocsServer-99ec8af2.cjs.js","sources":["../../src/lib/run.ts","../../src/lib/mkdocsServer.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 */\nimport { spawn, SpawnOptions, ChildProcess } from 'child_process';\n\nexport type LogFunc = (data: Buffer | string) => void;\ntype SpawnOptionsPartialEnv = Omit<SpawnOptions, 'env'> & {\n env?: Partial<NodeJS.ProcessEnv>;\n // Pipe stdout to this log function\n stdoutLogFunc?: LogFunc;\n // Pipe stderr to this log function\n stderrLogFunc?: LogFunc;\n};\n\n// TODO: Accept log functions to pipe logs with.\n// Runs a child command, returning the child process instance.\n// Use it along with waitForSignal to run a long running process e.g. mkdocs serve\nexport const run = async (\n name: string,\n args: string[] = [],\n options: SpawnOptionsPartialEnv = {},\n): Promise<ChildProcess> => {\n const { stdoutLogFunc, stderrLogFunc } = options;\n\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n FORCE_COLOR: 'true',\n ...(options.env ?? {}),\n };\n\n // Refer: https://nodejs.org/api/child_process.html#child_process_subprocess_stdio\n const stdio = [\n 'inherit',\n stdoutLogFunc ? 'pipe' : 'inherit',\n stderrLogFunc ? 'pipe' : 'inherit',\n ] as ('inherit' | 'pipe')[];\n\n const childProcess = spawn(name, args, {\n stdio: stdio,\n ...options,\n env,\n });\n\n if (stdoutLogFunc && childProcess.stdout) {\n childProcess.stdout.on('data', stdoutLogFunc);\n }\n if (stderrLogFunc && childProcess.stderr) {\n childProcess.stderr.on('data', stderrLogFunc);\n }\n\n return childProcess;\n};\n\n// Block indefinitely and wait for a signal to kill the child process(es)\n// Throw error if any child process errors\n// Resolves only when all processes exit with status code 0\nexport async function waitForSignal(\n childProcesses: Array<ChildProcess>,\n): Promise<void> {\n const promises: Array<Promise<void>> = [];\n\n for (const signal of ['SIGINT', 'SIGTERM'] as const) {\n process.on(signal, () => {\n childProcesses.forEach(childProcess => {\n childProcess.kill();\n });\n });\n }\n\n childProcesses.forEach(childProcess => {\n if (typeof childProcess.exitCode === 'number') {\n if (childProcess.exitCode) {\n throw new Error(`Non zero exit code from child process`);\n }\n return;\n }\n\n promises.push(\n new Promise<void>((resolve, reject) => {\n childProcess.once('error', reject);\n childProcess.once('exit', resolve);\n }),\n );\n });\n\n await Promise.all(promises);\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 { ChildProcess } from 'child_process';\nimport { run, LogFunc } from './run';\n\nexport const runMkdocsServer = async (options: {\n port?: string;\n useDocker?: boolean;\n dockerImage?: string;\n dockerEntrypoint?: string;\n dockerOptions?: string[];\n stdoutLogFunc?: LogFunc;\n stderrLogFunc?: LogFunc;\n}): Promise<ChildProcess> => {\n const port = options.port ?? '8000';\n const useDocker = options.useDocker ?? true;\n const dockerImage = options.dockerImage ?? 'spotify/techdocs';\n\n if (useDocker) {\n return await run(\n 'docker',\n [\n 'run',\n '--rm',\n '-w',\n '/content',\n '-v',\n `${process.cwd()}:/content`,\n '-p',\n `${port}:${port}`,\n '-it',\n ...(options.dockerEntrypoint\n ? ['--entrypoint', options.dockerEntrypoint]\n : []),\n ...(options.dockerOptions || []),\n dockerImage,\n 'serve',\n '--dev-addr',\n `0.0.0.0:${port}`,\n ],\n {\n stdoutLogFunc: options.stdoutLogFunc,\n stderrLogFunc: options.stderrLogFunc,\n },\n );\n }\n\n return await run('mkdocs', ['serve', '--dev-addr', `127.0.0.1:${port}`], {\n stdoutLogFunc: options.stdoutLogFunc,\n stderrLogFunc: options.stderrLogFunc,\n });\n};\n"],"names":["spawn"],"mappings":";;;;AA6Ba,MAAA,GAAA,GAAM,OACjB,IACA,EAAA,IAAA,GAAiB,EACjB,EAAA,OAAA,GAAkC,EACR,KAAA;AAjC5B,EAAA,IAAA,EAAA,CAAA;AAkCE,EAAM,MAAA,EAAE,aAAe,EAAA,aAAA,EAAkB,GAAA,OAAA,CAAA;AAEzC,EAAA,MAAM,GAAyB,GAAA;AAAA,IAC7B,GAAG,OAAQ,CAAA,GAAA;AAAA,IACX,WAAa,EAAA,MAAA;AAAA,IACb,GAAI,CAAA,EAAA,GAAA,OAAA,CAAQ,GAAR,KAAA,IAAA,GAAA,EAAA,GAAe,EAAC;AAAA,GACtB,CAAA;AAGA,EAAA,MAAM,KAAQ,GAAA;AAAA,IACZ,SAAA;AAAA,IACA,gBAAgB,MAAS,GAAA,SAAA;AAAA,IACzB,gBAAgB,MAAS,GAAA,SAAA;AAAA,GAC3B,CAAA;AAEA,EAAM,MAAA,YAAA,GAAeA,mBAAM,CAAA,IAAA,EAAM,IAAM,EAAA;AAAA,IACrC,KAAA;AAAA,IACA,GAAG,OAAA;AAAA,IACH,GAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAI,IAAA,aAAA,IAAiB,aAAa,MAAQ,EAAA;AACxC,IAAa,YAAA,CAAA,MAAA,CAAO,EAAG,CAAA,MAAA,EAAQ,aAAa,CAAA,CAAA;AAAA,GAC9C;AACA,EAAI,IAAA,aAAA,IAAiB,aAAa,MAAQ,EAAA;AACxC,IAAa,YAAA,CAAA,MAAA,CAAO,EAAG,CAAA,MAAA,EAAQ,aAAa,CAAA,CAAA;AAAA,GAC9C;AAEA,EAAO,OAAA,YAAA,CAAA;AACT,CAAA,CAAA;AAKA,eAAsB,cACpB,cACe,EAAA;AACf,EAAA,MAAM,WAAiC,EAAC,CAAA;AAExC,EAAA,KAAA,MAAW,MAAU,IAAA,CAAC,QAAU,EAAA,SAAS,CAAY,EAAA;AACnD,IAAQ,OAAA,CAAA,EAAA,CAAG,QAAQ,MAAM;AACvB,MAAA,cAAA,CAAe,QAAQ,CAAgB,YAAA,KAAA;AACrC,QAAA,YAAA,CAAa,IAAK,EAAA,CAAA;AAAA,OACnB,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAAA,GACH;AAEA,EAAA,cAAA,CAAe,QAAQ,CAAgB,YAAA,KAAA;AACrC,IAAI,IAAA,OAAO,YAAa,CAAA,QAAA,KAAa,QAAU,EAAA;AAC7C,MAAA,IAAI,aAAa,QAAU,EAAA;AACzB,QAAM,MAAA,IAAI,MAAM,CAAuC,qCAAA,CAAA,CAAA,CAAA;AAAA,OACzD;AACA,MAAA,OAAA;AAAA,KACF;AAEA,IAAS,QAAA,CAAA,IAAA;AAAA,MACP,IAAI,OAAA,CAAc,CAAC,OAAA,EAAS,MAAW,KAAA;AACrC,QAAa,YAAA,CAAA,IAAA,CAAK,SAAS,MAAM,CAAA,CAAA;AACjC,QAAa,YAAA,CAAA,IAAA,CAAK,QAAQ,OAAO,CAAA,CAAA;AAAA,OAClC,CAAA;AAAA,KACH,CAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAM,MAAA,OAAA,CAAQ,IAAI,QAAQ,CAAA,CAAA;AAC5B;;AC/Ea,MAAA,eAAA,GAAkB,OAAO,OAQT,KAAA;AA3B7B,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AA4BE,EAAM,MAAA,IAAA,GAAA,CAAO,EAAQ,GAAA,OAAA,CAAA,IAAA,KAAR,IAAgB,GAAA,EAAA,GAAA,MAAA,CAAA;AAC7B,EAAM,MAAA,SAAA,GAAA,CAAY,EAAQ,GAAA,OAAA,CAAA,SAAA,KAAR,IAAqB,GAAA,EAAA,GAAA,IAAA,CAAA;AACvC,EAAM,MAAA,WAAA,GAAA,CAAc,EAAQ,GAAA,OAAA,CAAA,WAAA,KAAR,IAAuB,GAAA,EAAA,GAAA,kBAAA,CAAA;AAE3C,EAAA,IAAI,SAAW,EAAA;AACb,IAAA,OAAO,MAAM,GAAA;AAAA,MACX,QAAA;AAAA,MACA;AAAA,QACE,KAAA;AAAA,QACA,MAAA;AAAA,QACA,IAAA;AAAA,QACA,UAAA;AAAA,QACA,IAAA;AAAA,QACA,CAAA,EAAG,QAAQ,GAAI,EAAA,CAAA,SAAA,CAAA;AAAA,QACf,IAAA;AAAA,QACA,GAAG,IAAQ,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA;AAAA,QACX,KAAA;AAAA,QACA,GAAI,QAAQ,gBACR,GAAA,CAAC,gBAAgB,OAAQ,CAAA,gBAAgB,IACzC,EAAC;AAAA,QACL,GAAI,OAAQ,CAAA,aAAA,IAAiB,EAAC;AAAA,QAC9B,WAAA;AAAA,QACA,OAAA;AAAA,QACA,YAAA;AAAA,QACA,CAAW,QAAA,EAAA,IAAA,CAAA,CAAA;AAAA,OACb;AAAA,MACA;AAAA,QACE,eAAe,OAAQ,CAAA,aAAA;AAAA,QACvB,eAAe,OAAQ,CAAA,aAAA;AAAA,OACzB;AAAA,KACF,CAAA;AAAA,GACF;AAEA,EAAO,OAAA,MAAM,IAAI,QAAU,EAAA,CAAC,SAAS,YAAc,EAAA,CAAA,UAAA,EAAa,MAAM,CAAG,EAAA;AAAA,IACvE,eAAe,OAAQ,CAAA,aAAA;AAAA,IACvB,eAAe,OAAQ,CAAA,aAAA;AAAA,GACxB,CAAA,CAAA;AACH;;;;;"}
1
+ {"version":3,"file":"mkdocsServer-99ec8af2.cjs.js","sources":["../../src/lib/run.ts","../../src/lib/mkdocsServer.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 */\nimport { spawn, SpawnOptions, ChildProcess } from 'child_process';\n\nexport type LogFunc = (data: Buffer | string) => void;\ntype SpawnOptionsPartialEnv = Omit<SpawnOptions, 'env'> & {\n env?: Partial<NodeJS.ProcessEnv>;\n // Pipe stdout to this log function\n stdoutLogFunc?: LogFunc;\n // Pipe stderr to this log function\n stderrLogFunc?: LogFunc;\n};\n\n// TODO: Accept log functions to pipe logs with.\n// Runs a child command, returning the child process instance.\n// Use it along with waitForSignal to run a long running process e.g. mkdocs serve\nexport const run = async (\n name: string,\n args: string[] = [],\n options: SpawnOptionsPartialEnv = {},\n): Promise<ChildProcess> => {\n const { stdoutLogFunc, stderrLogFunc } = options;\n\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n FORCE_COLOR: 'true',\n ...(options.env ?? {}),\n };\n\n // Refer: https://nodejs.org/api/child_process.html#child_process_subprocess_stdio\n const stdio = [\n 'inherit',\n stdoutLogFunc ? 'pipe' : 'inherit',\n stderrLogFunc ? 'pipe' : 'inherit',\n ] as ('inherit' | 'pipe')[];\n\n const childProcess = spawn(name, args, {\n stdio: stdio,\n ...options,\n env,\n });\n\n if (stdoutLogFunc && childProcess.stdout) {\n childProcess.stdout.on('data', stdoutLogFunc);\n }\n if (stderrLogFunc && childProcess.stderr) {\n childProcess.stderr.on('data', stderrLogFunc);\n }\n\n return childProcess;\n};\n\n// Block indefinitely and wait for a signal to stop the child process(es)\n// Throw error if any child process errors\n// Resolves only when all processes exit with status code 0\nexport async function waitForSignal(\n childProcesses: Array<ChildProcess>,\n): Promise<void> {\n const promises: Array<Promise<void>> = [];\n\n for (const signal of ['SIGINT', 'SIGTERM'] as const) {\n process.on(signal, () => {\n childProcesses.forEach(childProcess => {\n childProcess.kill();\n });\n });\n }\n\n childProcesses.forEach(childProcess => {\n if (typeof childProcess.exitCode === 'number') {\n if (childProcess.exitCode) {\n throw new Error(`Non zero exit code from child process`);\n }\n return;\n }\n\n promises.push(\n new Promise<void>((resolve, reject) => {\n childProcess.once('error', reject);\n childProcess.once('exit', resolve);\n }),\n );\n });\n\n await Promise.all(promises);\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 { ChildProcess } from 'child_process';\nimport { run, LogFunc } from './run';\n\nexport const runMkdocsServer = async (options: {\n port?: string;\n useDocker?: boolean;\n dockerImage?: string;\n dockerEntrypoint?: string;\n dockerOptions?: string[];\n stdoutLogFunc?: LogFunc;\n stderrLogFunc?: LogFunc;\n}): Promise<ChildProcess> => {\n const port = options.port ?? '8000';\n const useDocker = options.useDocker ?? true;\n const dockerImage = options.dockerImage ?? 'spotify/techdocs';\n\n if (useDocker) {\n return await run(\n 'docker',\n [\n 'run',\n '--rm',\n '-w',\n '/content',\n '-v',\n `${process.cwd()}:/content`,\n '-p',\n `${port}:${port}`,\n '-it',\n ...(options.dockerEntrypoint\n ? ['--entrypoint', options.dockerEntrypoint]\n : []),\n ...(options.dockerOptions || []),\n dockerImage,\n 'serve',\n '--dev-addr',\n `0.0.0.0:${port}`,\n ],\n {\n stdoutLogFunc: options.stdoutLogFunc,\n stderrLogFunc: options.stderrLogFunc,\n },\n );\n }\n\n return await run('mkdocs', ['serve', '--dev-addr', `127.0.0.1:${port}`], {\n stdoutLogFunc: options.stdoutLogFunc,\n stderrLogFunc: options.stderrLogFunc,\n });\n};\n"],"names":["spawn"],"mappings":";;;;AA6Ba,MAAA,GAAA,GAAM,OACjB,IACA,EAAA,IAAA,GAAiB,EACjB,EAAA,OAAA,GAAkC,EACR,KAAA;AAjC5B,EAAA,IAAA,EAAA,CAAA;AAkCE,EAAM,MAAA,EAAE,aAAe,EAAA,aAAA,EAAkB,GAAA,OAAA,CAAA;AAEzC,EAAA,MAAM,GAAyB,GAAA;AAAA,IAC7B,GAAG,OAAQ,CAAA,GAAA;AAAA,IACX,WAAa,EAAA,MAAA;AAAA,IACb,GAAI,CAAA,EAAA,GAAA,OAAA,CAAQ,GAAR,KAAA,IAAA,GAAA,EAAA,GAAe,EAAC;AAAA,GACtB,CAAA;AAGA,EAAA,MAAM,KAAQ,GAAA;AAAA,IACZ,SAAA;AAAA,IACA,gBAAgB,MAAS,GAAA,SAAA;AAAA,IACzB,gBAAgB,MAAS,GAAA,SAAA;AAAA,GAC3B,CAAA;AAEA,EAAM,MAAA,YAAA,GAAeA,mBAAM,CAAA,IAAA,EAAM,IAAM,EAAA;AAAA,IACrC,KAAA;AAAA,IACA,GAAG,OAAA;AAAA,IACH,GAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAI,IAAA,aAAA,IAAiB,aAAa,MAAQ,EAAA;AACxC,IAAa,YAAA,CAAA,MAAA,CAAO,EAAG,CAAA,MAAA,EAAQ,aAAa,CAAA,CAAA;AAAA,GAC9C;AACA,EAAI,IAAA,aAAA,IAAiB,aAAa,MAAQ,EAAA;AACxC,IAAa,YAAA,CAAA,MAAA,CAAO,EAAG,CAAA,MAAA,EAAQ,aAAa,CAAA,CAAA;AAAA,GAC9C;AAEA,EAAO,OAAA,YAAA,CAAA;AACT,CAAA,CAAA;AAKA,eAAsB,cACpB,cACe,EAAA;AACf,EAAA,MAAM,WAAiC,EAAC,CAAA;AAExC,EAAA,KAAA,MAAW,MAAU,IAAA,CAAC,QAAU,EAAA,SAAS,CAAY,EAAA;AACnD,IAAQ,OAAA,CAAA,EAAA,CAAG,QAAQ,MAAM;AACvB,MAAA,cAAA,CAAe,QAAQ,CAAgB,YAAA,KAAA;AACrC,QAAA,YAAA,CAAa,IAAK,EAAA,CAAA;AAAA,OACnB,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAAA,GACH;AAEA,EAAA,cAAA,CAAe,QAAQ,CAAgB,YAAA,KAAA;AACrC,IAAI,IAAA,OAAO,YAAa,CAAA,QAAA,KAAa,QAAU,EAAA;AAC7C,MAAA,IAAI,aAAa,QAAU,EAAA;AACzB,QAAM,MAAA,IAAI,MAAM,CAAuC,qCAAA,CAAA,CAAA,CAAA;AAAA,OACzD;AACA,MAAA,OAAA;AAAA,KACF;AAEA,IAAS,QAAA,CAAA,IAAA;AAAA,MACP,IAAI,OAAA,CAAc,CAAC,OAAA,EAAS,MAAW,KAAA;AACrC,QAAa,YAAA,CAAA,IAAA,CAAK,SAAS,MAAM,CAAA,CAAA;AACjC,QAAa,YAAA,CAAA,IAAA,CAAK,QAAQ,OAAO,CAAA,CAAA;AAAA,OAClC,CAAA;AAAA,KACH,CAAA;AAAA,GACD,CAAA,CAAA;AAED,EAAM,MAAA,OAAA,CAAQ,IAAI,QAAQ,CAAA,CAAA;AAC5B;;AC/Ea,MAAA,eAAA,GAAkB,OAAO,OAQT,KAAA;AA3B7B,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AA4BE,EAAM,MAAA,IAAA,GAAA,CAAO,EAAQ,GAAA,OAAA,CAAA,IAAA,KAAR,IAAgB,GAAA,EAAA,GAAA,MAAA,CAAA;AAC7B,EAAM,MAAA,SAAA,GAAA,CAAY,EAAQ,GAAA,OAAA,CAAA,SAAA,KAAR,IAAqB,GAAA,EAAA,GAAA,IAAA,CAAA;AACvC,EAAM,MAAA,WAAA,GAAA,CAAc,EAAQ,GAAA,OAAA,CAAA,WAAA,KAAR,IAAuB,GAAA,EAAA,GAAA,kBAAA,CAAA;AAE3C,EAAA,IAAI,SAAW,EAAA;AACb,IAAA,OAAO,MAAM,GAAA;AAAA,MACX,QAAA;AAAA,MACA;AAAA,QACE,KAAA;AAAA,QACA,MAAA;AAAA,QACA,IAAA;AAAA,QACA,UAAA;AAAA,QACA,IAAA;AAAA,QACA,CAAA,EAAG,QAAQ,GAAI,EAAA,CAAA,SAAA,CAAA;AAAA,QACf,IAAA;AAAA,QACA,GAAG,IAAQ,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA;AAAA,QACX,KAAA;AAAA,QACA,GAAI,QAAQ,gBACR,GAAA,CAAC,gBAAgB,OAAQ,CAAA,gBAAgB,IACzC,EAAC;AAAA,QACL,GAAI,OAAQ,CAAA,aAAA,IAAiB,EAAC;AAAA,QAC9B,WAAA;AAAA,QACA,OAAA;AAAA,QACA,YAAA;AAAA,QACA,CAAW,QAAA,EAAA,IAAA,CAAA,CAAA;AAAA,OACb;AAAA,MACA;AAAA,QACE,eAAe,OAAQ,CAAA,aAAA;AAAA,QACvB,eAAe,OAAQ,CAAA,aAAA;AAAA,OACzB;AAAA,KACF,CAAA;AAAA,GACF;AAEA,EAAO,OAAA,MAAM,IAAI,QAAU,EAAA,CAAC,SAAS,YAAc,EAAA,CAAA,UAAA,EAAa,MAAM,CAAG,EAAA;AAAA,IACvE,eAAe,OAAQ,CAAA,aAAA;AAAA,IACvB,eAAe,OAAQ,CAAA,aAAA;AAAA,GACxB,CAAA,CAAA;AACH;;;;;"}
@@ -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.8e467e32.js"></script><script defer="defer" src="/static/module-material-ui.8008c157.js"></script><script defer="defer" src="/static/module-lodash.0cada415.js"></script><script defer="defer" src="/static/module-date-fns.7dd2cc1f.js"></script><script defer="defer" src="/static/module-yaml.cb32d5ca.js"></script><script defer="defer" src="/static/module-ajv.2efe45a5.js"></script><script defer="defer" src="/static/module-material-table.ac270938.js"></script><script defer="defer" src="/static/module-luxon.8ea19264.js"></script><script defer="defer" src="/static/module-octokit.ea8cd5cc.js"></script><script defer="defer" src="/static/module-react-dom.5abdac04.js"></script><script defer="defer" src="/static/module-zod.49ffd80f.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.97cccd01.js"></script><script defer="defer" src="/static/module-remix-run.df834241.js"></script><script defer="defer" src="/static/vendor.8e467e32.js"></script><script defer="defer" src="/static/main.8e467e32.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.11a8d7f1.js"></script><script defer="defer" src="/static/module-material-ui.8008c157.js"></script><script defer="defer" src="/static/module-lodash.f07e54c1.js"></script><script defer="defer" src="/static/module-date-fns.7dd2cc1f.js"></script><script defer="defer" src="/static/module-yaml.cb32d5ca.js"></script><script defer="defer" src="/static/module-ajv.2efe45a5.js"></script><script defer="defer" src="/static/module-material-table.ac270938.js"></script><script defer="defer" src="/static/module-luxon.8ea19264.js"></script><script defer="defer" src="/static/module-octokit.ea8cd5cc.js"></script><script defer="defer" src="/static/module-react-dom.5abdac04.js"></script><script defer="defer" src="/static/module-zod.49ffd80f.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.97cccd01.js"></script><script defer="defer" src="/static/module-remix-run.ed639a8d.js"></script><script defer="defer" src="/static/vendor.11a8d7f1.js"></script><script defer="defer" src="/static/main.11a8d7f1.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1032,732],{81032:function(y,i,n){n.r(i),n.d(i,{DependsOnResourcesCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(u){const{variant:a="gridItem"}=u;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:a,title:"Depends on resources",entityKind:"Resource",relationType:c.nP,columns:r.resourceEntityColumns,emptyMessage:"No resource is a dependency of this component",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asResourceEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return u},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return g},componentEntityColumns:function(){return a},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return R}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),s=n(93414);function u(o){const{variant:l="gridItem",title:m,columns:j,entityKind:x,relationType:L,emptyMessage:k,emptyHelpLink:H,asRenderableEntities:D}=o,{entity:K}=(0,t.X2)(),{entities:S,loading:M,error:d}=(0,t.eK)(K,{type:L,kind:x});return M?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Ex,{})}):d?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:k}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(s.rU,{to:H,children:"Learn how to change this."})})]}),columns:j,entities:D(S||[])})}const a=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=o=>o,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=o=>o,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],R="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",g=o=>o}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1032,732],{81032:function(y,i,n){n.r(i),n.d(i,{DependsOnResourcesCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(u){const{variant:a="gridItem"}=u;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:a,title:"Depends on resources",entityKind:"Resource",relationType:c.nP,columns:r.resourceEntityColumns,emptyMessage:"No resource is a dependency of this component",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asResourceEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return u},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return g},componentEntityColumns:function(){return a},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return R}});var e=n(52322),c=n(90436),t=n(92848),r=n(2784),s=n(93414);function u(o){const{variant:l="gridItem",title:m,columns:j,entityKind:x,relationType:L,emptyMessage:k,emptyHelpLink:H,asRenderableEntities:D}=o,{entity:K}=(0,t.X2)(),{entities:S,loading:M,error:d}=(0,t.eK)(K,{type:L,kind:x});return M?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Ex,{})}):d?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:k}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(s.rU,{to:H,children:"Learn how to change this."})})]}),columns:j,entities:D(S||[])})}const a=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=o=>o,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=o=>o,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],R="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",g=o=>o}}]);})();
2
2
 
3
- //# sourceMappingURL=1032.eb3b9695.chunk.js.map
3
+ //# sourceMappingURL=1032.1b3a9ba2.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependsOnResourcesCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_DEPENDS_ON","columns","resourceEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asResourceEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","asComponentEntities","resourceEntityHelpLink","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"gQA+BO,SAASA,EAAuBC,EAAoC,CACzE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,uBACNC,WAAW,WACXC,aAAcC,KACdC,QAASC,wBACTC,aAAa,gDACbC,cAAeC,0BACfC,qBAAsBC,oB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWwB,EAAuBnB,GAClCA,EAEWR,EAAuD,CAClEiB,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWvB,EAAsBG,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1032.eb3b9695.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asResourceEntities,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n resourceEntityColumns,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnResourcesCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function DependsOnResourcesCard(props: DependsOnResourcesCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Depends on resources\"\n entityKind=\"Resource\"\n relationType={RELATION_DEPENDS_ON}\n columns={resourceEntityColumns}\n emptyMessage=\"No resource is a dependency of this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asResourceEntities}\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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependsOnResourcesCard/DependsOnResourcesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependsOnResourcesCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_DEPENDS_ON","columns","resourceEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asResourceEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","asComponentEntities","resourceEntityHelpLink","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"gQA+BO,SAASA,EAAuBC,EAAoC,CACzE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,uBACNC,WAAW,WACXC,aAAcC,KACdC,QAASC,wBACTC,aAAa,gDACbC,cAAeC,0BACfC,qBAAsBC,oB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWwB,EAAuBnB,GAClCA,EAEWR,EAAuD,CAClEiB,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWvB,EAAsBG,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1032.1b3a9ba2.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asResourceEntities,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n resourceEntityColumns,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnResourcesCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function DependsOnResourcesCard(props: DependsOnResourcesCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Depends on resources\"\n entityKind=\"Resource\"\n relationType={RELATION_DEPENDS_ON}\n columns={resourceEntityColumns}\n emptyMessage=\"No resource is a dependency of this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asResourceEntities}\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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1105,732],{1105:function(p,i,n){n.r(i),n.d(i,{HasComponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has components",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,emptyMessage:"No component is part of this system",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asComponentEntities})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),o=n(93414);function a(s){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:S}=s,{entity:K}=(0,t.X2)(),{entities:M,loading:T,error:d}=(0,t.eK)(K,{type:L,kind:H});return T?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Ex,{})}):d?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:k,children:"Learn how to change this."})})]}),columns:x,entities:S(M||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1105,732],{1105:function(p,i,n){n.r(i),n.d(i,{HasComponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has components",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,emptyMessage:"No component is part of this system",emptyHelpLink:r.componentEntityHelpLink,asRenderableEntities:r.asComponentEntities})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(92848),r=n(2784),o=n(93414);function a(s){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:S}=s,{entity:K}=(0,t.X2)(),{entities:M,loading:T,error:d}=(0,t.eK)(K,{type:L,kind:H});return T?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Ex,{})}):d?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:k,children:"Learn how to change this."})})]}),columns:x,entities:S(M||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
2
2
 
3
- //# sourceMappingURL=1105.40283456.chunk.js.map
3
+ //# sourceMappingURL=1105.b781a27e.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasComponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"0PA+BO,SAASA,EAAkBC,EAA+B,CAC/D,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,iBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,sCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1105.40283456.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasComponentsCard(props: HasComponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has components\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n emptyMessage=\"No component is part of this system\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n","/*\n * 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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasComponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"0PA+BO,SAASA,EAAkBC,EAA+B,CAC/D,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,iBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,sCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/1105.b781a27e.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasComponentsCard(props: HasComponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has components\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n emptyMessage=\"No component is part of this system\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n","/*\n * 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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[184,732],{40184:function(y,i,n){n.r(i),n.d(i,{DependencyOfComponentsCard:function(){return o}});var e=n(52322),r=n(25271),t=n(2784),c=n(732);function o(a){const{variant:u="gridItem",title:l="Dependency of components"}=a;return(0,e.jsx)(c.RelatedEntitiesCard,{variant:u,title:l,entityKind:"Component",relationType:r.w$,columns:c.componentEntityColumns,emptyMessage:"No component depends on this component",emptyHelpLink:c.componentEntityHelpLink,asRenderableEntities:c.asComponentEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return l},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),r=n(90436),t=n(43297),c=n(2784),o=n(93414);function a(s){const{variant:m="gridItem",title:d,columns:x,entityKind:L,relationType:R,emptyMessage:k,emptyHelpLink:H,asRenderableEntities:D}=s,{entity:K}=(0,t.X2)(),{entities:S,loading:M,error:p}=(0,t.eK)(K,{type:R,kind:L});return M?(0,e.jsx)(o.rJ,{variant:m,title:d,children:(0,e.jsx)(o.Ex,{})}):p?(0,e.jsx)(o.rJ,{variant:m,title:d,children:(0,e.jsx)(o.Gk,{error:p})}):(0,e.jsx)(t.u3,{title:d,variant:m,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(r.Z,{variant:"body1",children:k}),(0,e.jsx)(r.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:H,children:"Learn how to change this."})})]}),columns:x,entities:D(S||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[184,732],{40184:function(y,i,n){n.r(i),n.d(i,{DependencyOfComponentsCard:function(){return o}});var e=n(52322),r=n(25271),t=n(2784),c=n(732);function o(a){const{variant:u="gridItem",title:l="Dependency of components"}=a;return(0,e.jsx)(c.RelatedEntitiesCard,{variant:u,title:l,entityKind:"Component",relationType:r.w$,columns:c.componentEntityColumns,emptyMessage:"No component depends on this component",emptyHelpLink:c.componentEntityHelpLink,asRenderableEntities:c.asComponentEntities})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return l},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),r=n(90436),t=n(92848),c=n(2784),o=n(93414);function a(s){const{variant:m="gridItem",title:d,columns:x,entityKind:L,relationType:R,emptyMessage:k,emptyHelpLink:H,asRenderableEntities:D}=s,{entity:K}=(0,t.X2)(),{entities:S,loading:M,error:p}=(0,t.eK)(K,{type:R,kind:L});return M?(0,e.jsx)(o.rJ,{variant:m,title:d,children:(0,e.jsx)(o.Ex,{})}):p?(0,e.jsx)(o.rJ,{variant:m,title:d,children:(0,e.jsx)(o.Gk,{error:p})}):(0,e.jsx)(t.u3,{title:d,variant:m,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(r.Z,{variant:"body1",children:k}),(0,e.jsx)(r.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:H,children:"Learn how to change this."})})]}),columns:x,entities:D(S||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
2
2
 
3
- //# sourceMappingURL=184.1cc84853.chunk.js.map
3
+ //# sourceMappingURL=184.e3627fff.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependencyOfComponentsCard","props","variant","title","RelatedEntitiesCard","entityKind","relationType","RELATION_DEPENDENCY_OF","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"mQAgCO,SAASA,EACdC,EACA,CACA,KAAM,CAAEC,UAAU,WAAYC,QAAQ,0BAA2B,EAAIF,EACrE,O,EACE,OAACG,sBAAmBA,CAClBF,QAASA,EACTC,MAAOA,EACPE,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,yCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCSO,SAASV,EACdH,EACA,CACA,KAAM,CACJC,UAAU,WACVC,QACAK,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACqB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACsB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVvB,MAAOA,EACPD,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/184.1cc84853.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={componentEntityColumns}\n emptyMessage=\"No component depends on this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n","/*\n * 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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["DependencyOfComponentsCard","props","variant","title","RelatedEntitiesCard","entityKind","relationType","RELATION_DEPENDENCY_OF","columns","componentEntityColumns","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"mQAgCO,SAASA,EACdC,EACA,CACA,KAAM,CAAEC,UAAU,WAAYC,QAAQ,0BAA2B,EAAIF,EACrE,O,EACE,OAACG,sBAAmBA,CAClBF,QAASA,EACTC,MAAOA,EACPE,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,aAAa,yCACbC,cAAeC,0BACfC,qBAAsBC,qB,EAG5B,C,mgBCSO,SAASV,EACdH,EACA,CACA,KAAM,CACJC,UAAU,WACVC,QACAK,UACAH,aACAC,eACAI,eACAC,gBACAE,sBAAoB,EAClBZ,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACqB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASC,MAAOA,E,YACjC,OAACsB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVvB,MAAOA,EACPD,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASQ,C,MAC7B,OAACqB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAItB,E,SAAe,2B,QAI/BH,QAASA,EACTS,SAAUJ,EAAqBI,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMR,EAAyD,CACpEiB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCd,EACX,uFACWE,EAAuBG,GAClCA,EAEWkB,EAAuD,CAClET,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,sFACWC,EAAsBpB,GACjCA,EAEWqB,EAAmD,CAC9DZ,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCa,EACX,oFACWC,EAAoBvB,GAC/BA,C","file":"static/184.e3627fff.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={componentEntityColumns}\n emptyMessage=\"No component depends on this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n","/*\n * 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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2440,732],{82440:function(p,i,n){n.r(i),n.d(i,{HasSubcomponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has subcomponents",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,asRenderableEntities:r.asComponentEntities,emptyMessage:"No subcomponent is part of this component",emptyHelpLink:"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional"})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),o=n(93414);function a(s){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:S}=s,{entity:b}=(0,t.X2)(),{entities:K,loading:M,error:d}=(0,t.eK)(b,{type:L,kind:H});return M?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Ex,{})}):d?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:k,children:"Learn how to change this."})})]}),columns:x,entities:S(K||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2440,732],{82440:function(p,i,n){n.r(i),n.d(i,{HasSubcomponentsCard:function(){return o}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function o(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has subcomponents",entityKind:"Component",relationType:c.aS,columns:r.componentEntityColumns,asRenderableEntities:r.asComponentEntities,emptyMessage:"No subcomponent is part of this component",emptyHelpLink:"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional"})}},732:function(p,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return y},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(92848),r=n(2784),o=n(93414);function a(s){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:k,asRenderableEntities:S}=s,{entity:b}=(0,t.X2)(),{entities:K,loading:M,error:d}=(0,t.eK)(b,{type:L,kind:H});return M?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Ex,{})}):d?(0,e.jsx)(o.rJ,{variant:l,title:m,children:(0,e.jsx)(o.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(o.rU,{to:k,children:"Learn how to change this."})})]}),columns:x,entities:S(K||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],y="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=s=>s,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=s=>s,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=s=>s}}]);})();
2
2
 
3
- //# sourceMappingURL=2440.99fc794a.chunk.js.map
3
+ //# sourceMappingURL=2440.22336cc5.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSubcomponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","asRenderableEntities","asComponentEntities","emptyMessage","emptyHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","componentEntityHelpLink","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"8PA8BO,SAASA,EAAqBC,EAAkC,CACrE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,oBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,qBAAsBC,sBACtBC,aAAa,4CACbC,cAAc,mG,EAGpB,C,mgBCaO,SAASV,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEa,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMd,EACNe,KAAMhB,CACR,CAAC,EAED,OAAIY,G,EAEA,OAACK,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACmB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVrB,MAAOA,EACPF,QAASA,EACTwB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC5B,QAAQ,Q,SAASU,C,MAC7B,OAACkB,IAAUA,CAAC5B,QAAQ,Q,YAClB,OAAC6B,KAAIA,CAACC,GAAInB,E,SAAe,2B,QAI/BL,QAASA,EACTQ,SAAUN,EAAqBM,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMP,EAAyD,CACpEgB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCS,EACX,uFACWvB,EAAuBK,GAClCA,EAEWmB,EAAuD,CAClEV,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWC,EAAsBrB,GACjCA,EAEWsB,EAAmD,CAC9Db,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCc,EACX,oFACWC,EAAoBxB,GAC/BA,C","file":"static/2440.99fc794a.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has subcomponents\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n asRenderableEntities={asComponentEntities}\n emptyMessage=\"No subcomponent is part of this component\"\n emptyHelpLink=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional\"\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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSubcomponentsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","componentEntityColumns","asRenderableEntities","asComponentEntities","emptyMessage","emptyHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","defaultKind","componentEntityHelpLink","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"mappings":"8PA8BO,SAASA,EAAqBC,EAAkC,CACrE,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,oBACNC,WAAW,YACXC,aAAcC,KACdC,QAASC,yBACTC,qBAAsBC,sBACtBC,aAAa,4CACbC,cAAc,mG,EAGpB,C,mgBCaO,SAASV,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEa,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMd,EACNe,KAAMhB,CACR,CAAC,EAED,OAAIY,G,EAEA,OAACK,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACmB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACpB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVrB,MAAOA,EACPF,QAASA,EACTwB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC5B,QAAQ,Q,SAASU,C,MAC7B,OAACkB,IAAUA,CAAC5B,QAAQ,Q,YAClB,OAAC6B,KAAIA,CAACC,GAAInB,E,SAAe,2B,QAI/BL,QAASA,EACTQ,SAAUN,EAAqBM,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMP,EAAyD,CACpEgB,mCAA0C,CAAEQ,YAAa,WAAY,CAAC,EACtER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCS,EACX,uFACWvB,EAAuBK,GAClCA,EAEWmB,EAAuD,CAClEV,mCAA0C,CAAEQ,YAAa,UAAW,CAAC,EACrER,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCW,EACX,sFACWC,EAAsBrB,GACjCA,EAEWsB,EAAmD,CAC9Db,mCAA0C,CAAEQ,YAAa,QAAS,CAAC,EACnER,+BAAsC,EACtCA,6CAAoD,C,EAEzCc,EACX,oFACWC,EAAoBxB,GAC/BA,C","file":"static/2440.22336cc5.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has subcomponents\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n asRenderableEntities={asComponentEntities}\n emptyMessage=\"No subcomponent is part of this component\"\n emptyHelpLink=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional\"\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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5458,732],{5458:function(y,i,n){n.r(i),n.d(i,{HasSystemsCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has systems",entityKind:"System",relationType:c.aS,columns:r.systemEntityColumns,asRenderableEntities:r.asSystemEntities,emptyMessage:"No system is part of this domain",emptyHelpLink:r.systemEntityHelpLink})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(43297),r=n(2784),s=n(93414);function a(o){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:S,asRenderableEntities:k}=o,{entity:K}=(0,t.X2)(),{entities:M,loading:T,error:d}=(0,t.eK)(K,{type:L,kind:H});return T?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Ex,{})}):d?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(s.rU,{to:S,children:"Learn how to change this."})})]}),columns:x,entities:k(M||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=o=>o,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=o=>o,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=o=>o}}]);})();
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5458,732],{5458:function(y,i,n){n.r(i),n.d(i,{HasSystemsCard:function(){return s}});var e=n(52322),c=n(25271),t=n(2784),r=n(732);function s(a){const{variant:u="gridItem"}=a;return(0,e.jsx)(r.RelatedEntitiesCard,{variant:u,title:"Has systems",entityKind:"System",relationType:c.aS,columns:r.systemEntityColumns,asRenderableEntities:r.asSystemEntities,emptyMessage:"No system is part of this domain",emptyHelpLink:r.systemEntityHelpLink})}},732:function(y,i,n){n.r(i),n.d(i,{RelatedEntitiesCard:function(){return a},asComponentEntities:function(){return f},asResourceEntities:function(){return h},asSystemEntities:function(){return j},componentEntityColumns:function(){return u},componentEntityHelpLink:function(){return p},resourceEntityColumns:function(){return C},resourceEntityHelpLink:function(){return E},systemEntityColumns:function(){return v},systemEntityHelpLink:function(){return g}});var e=n(52322),c=n(90436),t=n(92848),r=n(2784),s=n(93414);function a(o){const{variant:l="gridItem",title:m,columns:x,entityKind:H,relationType:L,emptyMessage:R,emptyHelpLink:S,asRenderableEntities:k}=o,{entity:K}=(0,t.X2)(),{entities:M,loading:T,error:d}=(0,t.eK)(K,{type:L,kind:H});return T?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Ex,{})}):d?(0,e.jsx)(s.rJ,{variant:l,title:m,children:(0,e.jsx)(s.Gk,{error:d})}):(0,e.jsx)(t.u3,{title:m,variant:l,emptyContent:(0,e.jsxs)("div",{style:{textAlign:"center"},children:[(0,e.jsx)(c.Z,{variant:"body1",children:R}),(0,e.jsx)(c.Z,{variant:"body2",children:(0,e.jsx)(s.rU,{to:S,children:"Learn how to change this."})})]}),columns:x,entities:k(M||[])})}const u=[t.u3.columns.createEntityRefColumn({defaultKind:"component"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",f=o=>o,C=[t.u3.columns.createEntityRefColumn({defaultKind:"resource"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createSpecTypeColumn(),t.u3.columns.createSpecLifecycleColumn(),t.u3.columns.createMetadataDescriptionColumn()],E="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",h=o=>o,v=[t.u3.columns.createEntityRefColumn({defaultKind:"system"}),t.u3.columns.createOwnerColumn(),t.u3.columns.createMetadataDescriptionColumn()],g="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",j=o=>o}}]);})();
2
2
 
3
- //# sourceMappingURL=5458.c2cfc48a.chunk.js.map
3
+ //# sourceMappingURL=5458.4bf58a1b.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSystemsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","systemEntityColumns","asRenderableEntities","asSystemEntities","emptyMessage","emptyHelpLink","systemEntityHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities"],"mappings":"uPA+BO,SAASA,EAAeC,EAA4B,CACzD,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,cACNC,WAAW,SACXC,aAAcC,KACdC,QAASC,sBACTC,qBAAsBC,mBACtBC,aAAa,mCACbC,cAAeC,sB,EAGrB,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASU,C,MAC7B,OAACmB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAIpB,E,SAAe,2B,QAI/BL,QAASA,EACTS,SAAUP,EAAqBO,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,uFACWC,EAAuBpB,GAClCA,EAEWqB,EAAuD,CAClEZ,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCa,EACX,sFACWC,EAAsBvB,GACjCA,EAEWR,EAAmD,CAC9DiB,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCZ,EACX,oFACWH,EAAoBM,GAC/BA,C","file":"static/5458.c2cfc48a.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSystemsCard(props: HasSystemsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has systems\"\n entityKind=\"System\"\n relationType={RELATION_HAS_PART}\n columns={systemEntityColumns}\n asRenderableEntities={asSystemEntities}\n emptyMessage=\"No system is part of this domain\"\n emptyHelpLink={systemEntityHelpLink}\n />\n );\n}\n","/*\n * 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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"names":["HasSystemsCard","props","variant","RelatedEntitiesCard","title","entityKind","relationType","RELATION_HAS_PART","columns","systemEntityColumns","asRenderableEntities","asSystemEntities","emptyMessage","emptyHelpLink","systemEntityHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","div","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities"],"mappings":"uPA+BO,SAASA,EAAeC,EAA4B,CACzD,KAAM,CAAEC,UAAU,UAAW,EAAID,EACjC,O,EACE,OAACE,sBAAmBA,CAClBD,QAASA,EACTE,MAAM,cACNC,WAAW,SACXC,aAAcC,KACdC,QAASC,sBACTC,qBAAsBC,mBACtBC,aAAa,mCACbC,cAAeC,sB,EAGrB,C,mgBCYO,SAASX,EACdF,EACA,CACA,KAAM,CACJC,UAAU,WACVE,QACAI,UACAH,aACAC,eACAM,eACAC,gBACAH,sBAAoB,EAClBT,EAEE,CAAEc,QAAO,G,EAAIC,MAAU,EACvB,CAAEC,WAAUC,UAASC,OAAM,G,EAAIC,MAAmBL,EAAQ,CAC9DM,KAAMf,EACNgB,KAAMjB,CACR,CAAC,EAED,OAAIa,G,EAEA,OAACK,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACoB,KAAQA,G,GAKXL,G,EAEA,OAACI,KAAQA,CAACrB,QAASA,EAASE,MAAOA,E,YACjC,OAACqB,KAAkBA,CAACN,MAAOA,C,QAM/B,OAACO,KAAWA,CACVtB,MAAOA,EACPF,QAASA,EACTyB,c,EACE,QAACC,OAAIC,MAAO,CAAEC,UAAW,QAAS,E,aAChC,OAACC,IAAUA,CAAC7B,QAAQ,Q,SAASU,C,MAC7B,OAACmB,IAAUA,CAAC7B,QAAQ,Q,YAClB,OAAC8B,KAAIA,CAACC,GAAIpB,E,SAAe,2B,QAI/BL,QAASA,EACTS,SAAUP,EAAqBO,GAAY,CAAC,CAAC,C,EAGnD,CCrFO,MAAMiB,EAAyD,CACpER,mCAA0C,CAAES,YAAa,WAAY,CAAC,EACtET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCU,EACX,uFACWC,EAAuBpB,GAClCA,EAEWqB,EAAuD,CAClEZ,mCAA0C,CAAES,YAAa,UAAW,CAAC,EACrET,+BAAsC,EACtCA,kCAAyC,EACzCA,uCAA8C,EAC9CA,6CAAoD,C,EAEzCa,EACX,sFACWC,EAAsBvB,GACjCA,EAEWR,EAAmD,CAC9DiB,mCAA0C,CAAES,YAAa,QAAS,CAAC,EACnET,+BAAsC,EACtCA,6CAAoD,C,EAEzCZ,EACX,oFACWH,EAAoBM,GAC/BA,C","file":"static/5458.4bf58a1b.chunk.js","sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSystemsCard(props: HasSystemsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has systems\"\n entityKind=\"System\"\n relationType={RELATION_HAS_PART}\n columns={systemEntityColumns}\n asRenderableEntities={asSystemEntities}\n emptyMessage=\"No system is part of this domain\"\n emptyHelpLink={systemEntityHelpLink}\n />\n );\n}\n","/*\n * 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 { Entity } from '@backstage/catalog-model';\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 InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\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<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\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 <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\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: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"sourceRoot":""}
@@ -0,0 +1,3 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5837],{95837:function(F,e,s){s.r(e),s.d(e,{CatalogPage:function(){return h},DefaultCatalogPage:function(){return c}});var t=s(52322),P=s(2784),g=s(73557),l=s(93414),i=s(25248),n=s(92848),u=s(19625),x=s(86359);const j=()=>(0,i.yx)();function c(o){const{columns:r,actions:m,initiallySelectedFilter:C="owned",initialKind:f="component",tableOptions:p={},emptyContent:v}=o;var a;const y=(a=(0,i.h_)(i.Ds).getOptionalString("organization.name"))!==null&&a!==void 0?a:"Backstage",d=(0,i.tg)(u.yw),{createButtonTitle:O}=j();return(0,t.jsx)(l.g9,{title:`${y} Catalog`,themeId:"home",children:(0,t.jsxs)(l.VY,{children:[(0,t.jsxs)(l.yW,{title:"",children:[(0,t.jsx)(l.XF,{title:O,to:d&&d()}),(0,t.jsx)(l.qt,{children:"All your software catalog entities"})]}),(0,t.jsx)(n.UO,{children:(0,t.jsxs)(n._i,{children:[(0,t.jsxs)(n._i.Filters,{children:[(0,t.jsx)(n.tW,{initialFilter:f}),(0,t.jsx)(n.sL,{}),(0,t.jsx)(n.EW,{initialFilter:C}),(0,t.jsx)(n.dq,{}),(0,t.jsx)(n.df,{}),(0,t.jsx)(n.xE,{}),(0,t.jsx)(n.nl,{})]}),(0,t.jsx)(n._i.Content,{children:(0,t.jsx)(x.E,{columns:r,actions:m,tableOptions:p,emptyContent:v})})]})})]})})}function h(o){return(0,g.pC)()||(0,t.jsx)(c,{...o})}}}]);})();
2
+
3
+ //# sourceMappingURL=5837.c94ef7e1.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/options.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogPage/CatalogPage.tsx"],"names":["useCatalogPluginOptions","usePluginOptions","DefaultCatalogPage","props","columns","actions","initiallySelectedFilter","initialKind","tableOptions","emptyContent","useApi","orgName","configApiRef","getOptionalString","createComponentLink","useRouteRef","createComponentRouteRef","createButtonTitle","PageWithHeader","title","themeId","Content","ContentHeader","CreateButton","to","SupportButton","EntityListProvider","CatalogFilterLayout","EntityKindPicker","initialFilter","EntityTypePicker","UserListPicker","EntityOwnerPicker","EntityLifecyclePicker","EntityTagPicker","EntityProcessingStatusPicker","CatalogTable","CatalogPage","useOutlet"],"mappings":"uUA2BO,MAAMA,EAA0B,K,EACrCC,MAAgBA,EC6BX,SAASC,EAAmBC,EAAgC,CACjE,KAAM,CACJC,UACAC,UACAC,0BAA0B,QAC1BC,cAAc,YACdC,eAAe,CAAC,EAChBC,cAAY,EACVN,E,IAEFO,EADF,MAAMC,GACJD,G,EAAAA,MAAOE,IAAYA,EAAEC,kBAAkB,mBAAmB,KAAnB,MAAvCH,aAA+D,YAC3DI,G,EAAsBC,MAAYC,IAAuBA,EAEzD,CAAEC,mBAAkB,EAAIjB,EAAwB,EAEtD,O,EACE,OAACkB,KAAcA,CAACC,MAAO,GAAGR,YAAmBS,QAAQ,O,YACnD,QAACC,KAAOA,C,aACN,QAACC,KAAaA,CAACH,MAAM,G,aACnB,OAACI,KAAYA,CACXJ,MAAOF,EACPO,GAAIV,GAAuBA,EAAoB,C,MAEjD,OAACW,KAAaA,C,SAAC,oC,SAEjB,OAACC,KAAkBA,C,YACjB,QAACC,KAAmBA,C,aAClB,QAACA,aAA2B,C,aAC1B,OAACC,KAAgBA,CAACC,cAAetB,C,MACjC,OAACuB,KAAgBA,K,EACjB,OAACC,KAAcA,CAACF,cAAevB,C,MAC/B,OAAC0B,KAAiBA,K,EAClB,OAACC,KAAqBA,K,EACtB,OAACC,KAAeA,K,EAChB,OAACC,KAA4BA,G,OAE/B,OAACR,aAA2B,C,YAC1B,OAACS,IAAYA,CACXhC,QAASA,EACTC,QAASA,EACTG,aAAcA,EACdC,aAAcA,C,cAQ9B,CCnFO,SAAS4B,EAAYlC,EAAgC,CAG1D,O,EAFemC,MAAU,I,EAER,OAACpC,EAAkBA,CAAE,GAAGC,C,EAC3C,C","file":"static/5837.c94ef7e1.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 { usePluginOptions } from '@backstage/core-plugin-api';\n\nexport type CatalogPluginOptions = {\n createButtonTitle: string;\n};\n\n/** @ignore */\nexport type CatalogInputPluginOptions = {\n createButtonTitle: string;\n};\n\nexport const useCatalogPluginOptions = () =>\n usePluginOptions<CatalogPluginOptions>();\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityProcessingStatusPicker,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n EntityKindPicker,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { useCatalogPluginOptions } from '../../options';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n const { createButtonTitle } = useCatalogPluginOptions();\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title={createButtonTitle}\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter={initialKind} />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n <EntityProcessingStatusPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\n}\n"],"sourceRoot":""}
@@ -0,0 +1,3 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5869],{96686:function(Le,_e,V){V.d(_e,{O:function(){return Te}});var Y=V(2784);function de(B){var b=(0,Y.useRef)(B);return b.current=B,(0,Y.useMemo)(function(){return Object.freeze({get current(){return b.current}})},[])}var Se=V(29862);function fe(B){var b=(0,Y.useState)(B),oe=b[0],ae=b[1],he=(0,Se.t)(!0);return[oe,(0,Y.useCallback)(function(Q){he()&&ae(Q)},[])]}function re(B,b){return typeof B=="function"?B(b):B}function Te(B,b){B===void 0&&(B=!1),b===void 0&&(b=!0);var oe=fe(B),ae=oe[0],he=oe[1],Q=de(b);return[ae,(0,Y.useCallback)(function(ee){he(function(Ie){return typeof ee=="undefined"||Q.current&&typeof ee=="object"&&(ee.constructor.name==="SyntheticBaseEvent"||typeof ee._reactName=="string")?!Ie:Boolean(re(ee,Ie))})},[])]}},7688:function(Le,_e,V){var Y=V(2784),de=function(L,g){if(!(L instanceof g))throw new TypeError("Cannot call a class as a function")},Se=function(){function L(g,y){for(var z=0;z<y.length;z++){var C=y[z];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(g,C.key,C)}}return function(g,y,z){return y&&L(g.prototype,y),z&&L(g,z),g}}(),fe=Object.assign||function(L){for(var g=1;g<arguments.length;g++){var y=arguments[g];for(var z in y)Object.prototype.hasOwnProperty.call(y,z)&&(L[z]=y[z])}return L},re=function(L,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);L.prototype=Object.create(g&&g.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(L,g):L.__proto__=g)},Te=function(L,g){if(!L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:L},B=function(){function L(g,y){var z=[],C=!0,te=!1,k=void 0;try{for(var G=g[Symbol.iterator](),j;!(C=(j=G.next()).done)&&(z.push(j.value),!(y&&z.length===y));C=!0);}catch(K){te=!0,k=K}finally{try{!C&&G.return&&G.return()}finally{if(te)throw k}}return z}return function(g,y){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return L(g,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b=void 0;typeof window!="undefined"?b=window:typeof self!="undefined"?b=self:b=V.g;var oe=null,ae=null,he=20,Q=b.clearTimeout,ee=b.setTimeout,Ie=b.cancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelAnimationFrame,We=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame;Ie==null||We==null?(oe=Q,ae=function(g){return ee(g,he)}):(oe=function(g){var y=B(g,2),z=y[0],C=y[1];Ie(z),Q(C)},ae=function(g){var y=We(function(){Q(z),g()}),z=ee(function(){Ie(y),g()},he);return[y,z]});function Ne(L){var g=void 0,y=void 0,z=void 0,C=void 0,te=void 0,k=void 0,G=void 0,j=typeof document!="undefined"&&document.attachEvent;if(!j){k=function(m){var A=m.__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},te=function(m){return m.offsetWidth!==m.__resizeLast__.width||m.offsetHeight!==m.__resizeLast__.height},G=function(m){if(!(m.target.className&&typeof m.target.className.indexOf=="function"&&m.target.className.indexOf("contract-trigger")<0&&m.target.className.indexOf("expand-trigger")<0)){var A=this;k(this),this.__resizeRAF__&&oe(this.__resizeRAF__),this.__resizeRAF__=ae(function(){te(A)&&(A.__resizeLast__.width=A.offsetWidth,A.__resizeLast__.height=A.offsetHeight,A.__resizeListeners__.forEach(function(pe){pe.call(A,m)}))})}};var K=!1,se="";z="animationstart";var ve="Webkit Moz O ms".split(" "),ge="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),ne="";{var le=document.createElement("fakeelement");if(le.style.animationName!==void 0&&(K=!0),K===!1){for(var ue=0;ue<ve.length;ue++)if(le.style[ve[ue]+"AnimationName"]!==void 0){ne=ve[ue],se="-"+ne.toLowerCase()+"-",z=ge[ue],K=!0;break}}}y="resizeanim",g="@"+se+"keyframes "+y+" { from { opacity: 0; } to { opacity: 0; } } ",C=se+"animation: 1ms "+y+"; "}var we=function(m){if(!m.getElementById("detectElementResize")){var A=(g||"")+".resize-triggers { "+(C||"")+'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%; }',$=m.head||m.getElementsByTagName("head")[0],Z=m.createElement("style");Z.id="detectElementResize",Z.type="text/css",L!=null&&Z.setAttribute("nonce",L),Z.styleSheet?Z.styleSheet.cssText=A:Z.appendChild(m.createTextNode(A)),$.appendChild(Z)}},Re=function(m,A){if(j)m.attachEvent("onresize",A);else{if(!m.__resizeTriggers__){var $=m.ownerDocument,Z=b.getComputedStyle(m);Z&&Z.position==="static"&&(m.style.position="relative"),we($),m.__resizeLast__={},m.__resizeListeners__=[],(m.__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",m.__resizeTriggers__.appendChild(pe),m.__resizeTriggers__.appendChild(Ae),m.appendChild(m.__resizeTriggers__),k(m),m.addEventListener("scroll",G,!0),z&&(m.__resizeTriggers__.__animationListener__=function(Oe){Oe.animationName===y&&k(m)},m.__resizeTriggers__.addEventListener(z,m.__resizeTriggers__.__animationListener__))}m.__resizeListeners__.push(A)}},xe=function(m,A){if(j)m.detachEvent("onresize",A);else if(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(A),1),!m.__resizeListeners__.length){m.removeEventListener("scroll",G,!0),m.__resizeTriggers__.__animationListener__&&(m.__resizeTriggers__.removeEventListener(z,m.__resizeTriggers__.__animationListener__),m.__resizeTriggers__.__animationListener__=null);try{m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)}catch{}}};return{addResizeListener:Re,removeResizeListener:xe}}var Fe=function(L){re(g,L);function g(){var y,z,C,te;de(this,g);for(var k=arguments.length,G=Array(k),j=0;j<k;j++)G[j]=arguments[j];return te=(z=(C=Te(this,(y=g.__proto__||Object.getPrototypeOf(g)).call.apply(y,[this].concat(G))),C),C.state={height:C.props.defaultHeight||0,width:C.props.defaultWidth||0},C._onResize=function(){var K=C.props,se=K.disableHeight,ve=K.disableWidth,ge=K.onResize;if(C._parentNode){var ne=C._parentNode.offsetHeight||0,le=C._parentNode.offsetWidth||0,ue=window.getComputedStyle(C._parentNode)||{},we=parseInt(ue.paddingLeft,10)||0,Re=parseInt(ue.paddingRight,10)||0,xe=parseInt(ue.paddingTop,10)||0,J=parseInt(ue.paddingBottom,10)||0,m=ne-xe-J,A=le-we-Re;(!se&&C.state.height!==m||!ve&&C.state.width!==A)&&(C.setState({height:ne-xe-J,width:le-we-Re}),ge({height:ne,width:le}))}},C._setRef=function(K){C._autoSizer=K},z),Te(C,te)}return Se(g,[{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,C=z.children,te=z.className,k=z.disableHeight,G=z.disableWidth,j=z.style,K=this.state,se=K.height,ve=K.width,ge={overflow:"visible"},ne={},le=!1;return k||(se===0&&(le=!0),ge.height=0,ne.height=se),G||(ve===0&&(le=!0),ge.width=0,ne.width=ve),(0,Y.createElement)("div",{className:te,ref:this._setRef,style:fe({},ge,j)},!le&&C(ne))}}]),g}(Y.PureComponent);Fe.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}},_e.Z=Fe},50166:function(Le,_e,V){V.d(_e,{t7:function(){return De}});var Y=V(7896),de=V(80753),Se=V(81665),fe=V(36631),re=V(2784),Te=typeof performance=="object"&&typeof performance.now=="function",B=Te?function(){return performance.now()}:function(){return Date.now()};function b(a){cancelAnimationFrame(a.id)}function oe(a,e){var t=B();function r(){B()-t>=e?a.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var ae=-1;function he(a){if(a===void 0&&(a=!1),ae===-1||a){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(e),ae=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return ae}var Q=null;function ee(a){if(a===void 0&&(a=!1),Q===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?Q="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Q="negative":Q="positive-ascending"),document.body.removeChild(e),Q}return Q}var Ie=150,We=function(e){var t=e.columnIndex,r=e.data,i=e.rowIndex;return i+":"+t},Ne=null,Fe=null,L=null;function g(a){var e,t=a.getColumnOffset,r=a.getColumnStartIndexForOffset,i=a.getColumnStopIndexForStartIndex,l=a.getColumnWidth,s=a.getEstimatedTotalHeight,u=a.getEstimatedTotalWidth,c=a.getOffsetForColumnAndAlignment,S=a.getOffsetForRowAndAlignment,v=a.getRowHeight,w=a.getRowOffset,I=a.getRowStartIndexForOffset,E=a.getRowStopIndexForStartIndex,N=a.initInstanceProps,o=a.shouldResetStyleCacheOnItemSizeChange,h=a.validateProps;return e=function(p){(0,Se.Z)(R,p);function R(O){var n;return n=p.call(this,O)||this,n._instanceProps=N(n.props,(0,de.Z)(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:(0,de.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,fe.Z)(function(d,f,_,x,M,W,D,U){return n.props.onItemsRendered({overscanColumnStartIndex:d,overscanColumnStopIndex:f,overscanRowStartIndex:_,overscanRowStopIndex:x,visibleColumnStartIndex:M,visibleColumnStopIndex:W,visibleRowStartIndex:D,visibleRowStopIndex:U})}),n._callOnScroll=void 0,n._callOnScroll=(0,fe.Z)(function(d,f,_,x,M){return n.props.onScroll({horizontalScrollDirection:_,scrollLeft:d,scrollTop:f,verticalScrollDirection:x,scrollUpdateWasRequested:M})}),n._getItemStyle=void 0,n._getItemStyle=function(d,f){var _=n.props,x=_.columnWidth,M=_.direction,W=_.rowHeight,D=n._getItemStyleCache(o&&x,o&&M,o&&W),U=d+":"+f,H;if(D.hasOwnProperty(U))H=D[U];else{var P=t(n.props,f,n._instanceProps),F=M==="rtl";D[U]=H={position:"absolute",left:F?void 0:P,right:F?P:void 0,top:w(n.props,d,n._instanceProps),height:v(n.props,d,n._instanceProps),width:l(n.props,f,n._instanceProps)}}return H},n._getItemStyleCache=void 0,n._getItemStyleCache=(0,fe.Z)(function(d,f,_){return{}}),n._onScroll=function(d){var f=d.currentTarget,_=f.clientHeight,x=f.clientWidth,M=f.scrollLeft,W=f.scrollTop,D=f.scrollHeight,U=f.scrollWidth;n.setState(function(H){if(H.scrollLeft===M&&H.scrollTop===W)return null;var P=n.props.direction,F=M;if(P==="rtl")switch(ee()){case"negative":F=-M;break;case"positive-descending":F=U-x-M;break}F=Math.max(0,Math.min(F,U-x));var q=Math.max(0,Math.min(W,D-_));return{isScrolling:!0,horizontalScrollDirection:H.scrollLeft<M?"forward":"backward",scrollLeft:F,scrollTop:q,verticalScrollDirection:H.scrollTop<W?"forward":"backward",scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(d){var f=n.props.outerRef;n._outerRef=d,typeof f=="function"?f(d):f!=null&&typeof f=="object"&&f.hasOwnProperty("current")&&(f.current=d)},n._resetIsScrollingDebounced=function(){n._resetIsScrollingTimeoutId!==null&&b(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=oe(n._resetIsScrolling,Ie)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1)})},n}R.getDerivedStateFromProps=function(n,d){return y(n,d),h(n),null};var T=R.prototype;return T.scrollTo=function(n){var d=n.scrollLeft,f=n.scrollTop;d!==void 0&&(d=Math.max(0,d)),f!==void 0&&(f=Math.max(0,f)),this.setState(function(_){return d===void 0&&(d=_.scrollLeft),f===void 0&&(f=_.scrollTop),_.scrollLeft===d&&_.scrollTop===f?null:{horizontalScrollDirection:_.scrollLeft<d?"forward":"backward",scrollLeft:d,scrollTop:f,scrollUpdateWasRequested:!0,verticalScrollDirection:_.scrollTop<f?"forward":"backward"}},this._resetIsScrollingDebounced)},T.scrollToItem=function(n){var d=n.align,f=d===void 0?"auto":d,_=n.columnIndex,x=n.rowIndex,M=this.props,W=M.columnCount,D=M.height,U=M.rowCount,H=M.width,P=this.state,F=P.scrollLeft,q=P.scrollTop,X=he();_!==void 0&&(_=Math.max(0,Math.min(_,W-1))),x!==void 0&&(x=Math.max(0,Math.min(x,U-1)));var ce=s(this.props,this._instanceProps),ie=u(this.props,this._instanceProps),Ce=ie>H?X:0,Me=ce>D?X:0;this.scrollTo({scrollLeft:_!==void 0?c(this.props,_,f,F,this._instanceProps,Me):F,scrollTop:x!==void 0?S(this.props,x,f,q,this._instanceProps,Ce):q})},T.componentDidMount=function(){var n=this.props,d=n.initialScrollLeft,f=n.initialScrollTop;if(this._outerRef!=null){var _=this._outerRef;typeof d=="number"&&(_.scrollLeft=d),typeof f=="number"&&(_.scrollTop=f)}this._callPropsCallbacks()},T.componentDidUpdate=function(){var n=this.props.direction,d=this.state,f=d.scrollLeft,_=d.scrollTop,x=d.scrollUpdateWasRequested;if(x&&this._outerRef!=null){var M=this._outerRef;if(n==="rtl")switch(ee()){case"negative":M.scrollLeft=-f;break;case"positive-ascending":M.scrollLeft=f;break;default:var W=M.clientWidth,D=M.scrollWidth;M.scrollLeft=D-W-f;break}else M.scrollLeft=Math.max(0,f);M.scrollTop=Math.max(0,_)}this._callPropsCallbacks()},T.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&b(this._resetIsScrollingTimeoutId)},T.render=function(){var n=this.props,d=n.children,f=n.className,_=n.columnCount,x=n.direction,M=n.height,W=n.innerRef,D=n.innerElementType,U=n.innerTagName,H=n.itemData,P=n.itemKey,F=P===void 0?We:P,q=n.outerElementType,X=n.outerTagName,ce=n.rowCount,ie=n.style,Ce=n.useIsScrolling,Me=n.width,ze=this.state.isScrolling,me=this._getHorizontalRangeToRender(),ye=me[0],Ze=me[1],He=this._getVerticalRangeToRender(),Be=He[0],qe=He[1],Pe=[];if(_>0&&ce)for(var be=Be;be<=qe;be++)for(var Ee=ye;Ee<=Ze;Ee++)Pe.push((0,re.createElement)(d,{columnIndex:Ee,data:H,isScrolling:Ce?ze:void 0,key:F({columnIndex:Ee,data:H,rowIndex:be}),rowIndex:be,style:this._getItemStyle(be,Ee)}));var je=s(this.props,this._instanceProps),Ke=u(this.props,this._instanceProps);return(0,re.createElement)(q||X||"div",{className:f,onScroll:this._onScroll,ref:this._outerRefSetter,style:(0,Y.Z)({position:"relative",height:M,width:Me,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:x},ie)},(0,re.createElement)(D||U||"div",{children:Pe,ref:W,style:{height:je,pointerEvents:ze?"none":void 0,width:Ke}}))},T._callPropsCallbacks=function(){var n=this.props,d=n.columnCount,f=n.onItemsRendered,_=n.onScroll,x=n.rowCount;if(typeof f=="function"&&d>0&&x>0){var M=this._getHorizontalRangeToRender(),W=M[0],D=M[1],U=M[2],H=M[3],P=this._getVerticalRangeToRender(),F=P[0],q=P[1],X=P[2],ce=P[3];this._callOnItemsRendered(W,D,F,q,U,H,X,ce)}if(typeof _=="function"){var ie=this.state,Ce=ie.horizontalScrollDirection,Me=ie.scrollLeft,ze=ie.scrollTop,me=ie.scrollUpdateWasRequested,ye=ie.verticalScrollDirection;this._callOnScroll(Me,ze,Ce,ye,me)}},T._getHorizontalRangeToRender=function(){var n=this.props,d=n.columnCount,f=n.overscanColumnCount,_=n.overscanColumnsCount,x=n.overscanCount,M=n.rowCount,W=this.state,D=W.horizontalScrollDirection,U=W.isScrolling,H=W.scrollLeft,P=f||_||x||1;if(d===0||M===0)return[0,0,0,0];var F=r(this.props,H,this._instanceProps),q=i(this.props,F,H,this._instanceProps),X=!U||D==="backward"?Math.max(1,P):1,ce=!U||D==="forward"?Math.max(1,P):1;return[Math.max(0,F-X),Math.max(0,Math.min(d-1,q+ce)),F,q]},T._getVerticalRangeToRender=function(){var n=this.props,d=n.columnCount,f=n.overscanCount,_=n.overscanRowCount,x=n.overscanRowsCount,M=n.rowCount,W=this.state,D=W.isScrolling,U=W.verticalScrollDirection,H=W.scrollTop,P=_||x||f||1;if(d===0||M===0)return[0,0,0,0];var F=I(this.props,H,this._instanceProps),q=E(this.props,F,H,this._instanceProps),X=!D||U==="backward"?Math.max(1,P):1,ce=!D||U==="forward"?Math.max(1,P):1;return[Math.max(0,F-X),Math.max(0,Math.min(M-1,q+ce)),F,q]},R}(re.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,S=e.overscanCount,v=e.overscanRowsCount,w=e.width,I=t.instance},z=50,C=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 S=r-s-1,v=S*l;return u+v},te=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 S=r-s-1,v=S*l;return u+v},k=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 S=l[u];c=S.offset+S.size}for(var v=u+1;v<=r;v++){var w=s(v);l[v]={offset:c,size:w},c+=w}e==="column"?i.lastMeasuredColumnIndex=r:i.lastMeasuredRowIndex=r}return l[r]},G=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?j(e,t,r,s,0,i):K(e,t,r,Math.max(0,s),i)},j=function(e,t,r,i,l,s){for(;l<=i;){var u=l+Math.floor((i-l)/2),c=k(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&&k(e,t,i,r).offset<l;)i+=u,u*=2;return j(e,t,r,Math.min(i,s-1),Math.floor(i/2),l)},se=function(e,t,r,i,l,s,u){var c=e==="column"?t.width:t.height,S=k(e,t,r,s),v=e==="column"?te(t,s):C(t,s),w=Math.max(0,Math.min(v-c,S.offset)),I=Math.max(0,S.offset-c+u+S.size);switch(i==="smart"&&(l>=I-c&&l<=w+c?i="auto":i="center"),i){case"start":return w;case"end":return I;case"center":return Math.round(I+(w-I)/2);case"auto":default:return l>=I&&l<=w?l:I>w||l<I?I:w}},ve=g({getColumnOffset:function(e,t,r){return k("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return G("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,i){for(var l=e.columnCount,s=e.width,u=k("column",e,t,i),c=r+s,S=u.offset+u.size,v=t;v<l-1&&S<c;)v++,S+=k("column",e,v,i).size;return v},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:C,getEstimatedTotalWidth:te,getOffsetForColumnAndAlignment:function(e,t,r,i,l,s){return se("column",e,t,r,i,l,s)},getOffsetForRowAndAlignment:function(e,t,r,i,l,s){return se("row",e,t,r,i,l,s)},getRowOffset:function(e,t,r){return k("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return G("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,i){for(var l=e.rowCount,s=e.height,u=k("row",e,t,i),c=r+s,S=u.offset+u.size,v=t;v<l-1&&S<c;)v++,S+=k("row",e,v,i).size;return v},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,S=u.rowIndex,v=u.shouldForceUpdate,w=v===void 0?!0:v;typeof c=="number"&&(s.lastMeasuredColumnIndex=Math.min(s.lastMeasuredColumnIndex,c-1)),typeof S=="number"&&(s.lastMeasuredRowIndex=Math.min(s.lastMeasuredRowIndex,S-1)),t._getItemStyleCache(-1),w&&t.forceUpdate()},s},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){var t=e.columnWidth,r=e.rowHeight}}),ge=150,ne=function(e,t){return e},le=null,ue=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,S=a.shouldResetStyleCacheOnItemSizeChange,v=a.validateProps;return e=function(w){(0,Se.Z)(I,w);function I(N){var o;return o=w.call(this,N)||this,o._instanceProps=c(o.props,(0,de.Z)(o)),o._outerRef=void 0,o._resetIsScrollingTimeoutId=null,o.state={instance:(0,de.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,fe.Z)(function(h,p,R,T){return o.props.onItemsRendered({overscanStartIndex:h,overscanStopIndex:p,visibleStartIndex:R,visibleStopIndex:T})}),o._callOnScroll=void 0,o._callOnScroll=(0,fe.Z)(function(h,p,R){return o.props.onScroll({scrollDirection:h,scrollOffset:p,scrollUpdateWasRequested:R})}),o._getItemStyle=void 0,o._getItemStyle=function(h){var p=o.props,R=p.direction,T=p.itemSize,O=p.layout,n=o._getItemStyleCache(S&&T,S&&O,S&&R),d;if(n.hasOwnProperty(h))d=n[h];else{var f=t(o.props,h,o._instanceProps),_=i(o.props,h,o._instanceProps),x=R==="horizontal"||O==="horizontal",M=R==="rtl",W=x?f:0;n[h]=d={position:"absolute",left:M?void 0:W,right:M?W:void 0,top:x?0:f,height:x?"100%":_,width:x?_:"100%"}}return d},o._getItemStyleCache=void 0,o._getItemStyleCache=(0,fe.Z)(function(h,p,R){return{}}),o._onScrollHorizontal=function(h){var p=h.currentTarget,R=p.clientWidth,T=p.scrollLeft,O=p.scrollWidth;o.setState(function(n){if(n.scrollOffset===T)return null;var d=o.props.direction,f=T;if(d==="rtl")switch(ee()){case"negative":f=-T;break;case"positive-descending":f=O-R-T;break}return f=Math.max(0,Math.min(f,O-R)),{isScrolling:!0,scrollDirection:n.scrollOffset<T?"forward":"backward",scrollOffset:f,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._onScrollVertical=function(h){var p=h.currentTarget,R=p.clientHeight,T=p.scrollHeight,O=p.scrollTop;o.setState(function(n){if(n.scrollOffset===O)return null;var d=Math.max(0,Math.min(O,T-R));return{isScrolling:!0,scrollDirection:n.scrollOffset<d?"forward":"backward",scrollOffset:d,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._outerRefSetter=function(h){var p=o.props.outerRef;o._outerRef=h,typeof p=="function"?p(h):p!=null&&typeof p=="object"&&p.hasOwnProperty("current")&&(p.current=h)},o._resetIsScrollingDebounced=function(){o._resetIsScrollingTimeoutId!==null&&b(o._resetIsScrollingTimeoutId),o._resetIsScrollingTimeoutId=oe(o._resetIsScrolling,ge)},o._resetIsScrolling=function(){o._resetIsScrollingTimeoutId=null,o.setState({isScrolling:!1},function(){o._getItemStyleCache(-1,null)})},o}I.getDerivedStateFromProps=function(o,h){return Re(o,h),v(o),null};var E=I.prototype;return E.scrollTo=function(o){o=Math.max(0,o),this.setState(function(h){return h.scrollOffset===o?null:{scrollDirection:h.scrollOffset<o?"forward":"backward",scrollOffset:o,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},E.scrollToItem=function(o,h){h===void 0&&(h="auto");var p=this.props,R=p.itemCount,T=p.layout,O=this.state.scrollOffset;o=Math.max(0,Math.min(o,R-1));var n=0;if(this._outerRef){var d=this._outerRef;T==="vertical"?n=d.scrollWidth>d.clientWidth?he():0:n=d.scrollHeight>d.clientHeight?he():0}this.scrollTo(l(this.props,o,h,O,this._instanceProps,n))},E.componentDidMount=function(){var o=this.props,h=o.direction,p=o.initialScrollOffset,R=o.layout;if(typeof p=="number"&&this._outerRef!=null){var T=this._outerRef;h==="horizontal"||R==="horizontal"?T.scrollLeft=p:T.scrollTop=p}this._callPropsCallbacks()},E.componentDidUpdate=function(){var o=this.props,h=o.direction,p=o.layout,R=this.state,T=R.scrollOffset,O=R.scrollUpdateWasRequested;if(O&&this._outerRef!=null){var n=this._outerRef;if(h==="horizontal"||p==="horizontal")if(h==="rtl")switch(ee()){case"negative":n.scrollLeft=-T;break;case"positive-ascending":n.scrollLeft=T;break;default:var d=n.clientWidth,f=n.scrollWidth;n.scrollLeft=f-d-T;break}else n.scrollLeft=T;else n.scrollTop=T}this._callPropsCallbacks()},E.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&b(this._resetIsScrollingTimeoutId)},E.render=function(){var o=this.props,h=o.children,p=o.className,R=o.direction,T=o.height,O=o.innerRef,n=o.innerElementType,d=o.innerTagName,f=o.itemCount,_=o.itemData,x=o.itemKey,M=x===void 0?ne:x,W=o.layout,D=o.outerElementType,U=o.outerTagName,H=o.style,P=o.useIsScrolling,F=o.width,q=this.state.isScrolling,X=R==="horizontal"||W==="horizontal",ce=X?this._onScrollHorizontal:this._onScrollVertical,ie=this._getRangeToRender(),Ce=ie[0],Me=ie[1],ze=[];if(f>0)for(var me=Ce;me<=Me;me++)ze.push((0,re.createElement)(h,{data:_,key:M(me,_),index:me,isScrolling:P?q:void 0,style:this._getItemStyle(me)}));var ye=r(this.props,this._instanceProps);return(0,re.createElement)(D||U||"div",{className:p,onScroll:ce,ref:this._outerRefSetter,style:(0,Y.Z)({position:"relative",height:T,width:F,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:R},H)},(0,re.createElement)(n||d||"div",{children:ze,ref:O,style:{height:X?"100%":ye,pointerEvents:q?"none":void 0,width:X?ye:"100%"}}))},E._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var o=this.props.itemCount;if(o>0){var h=this._getRangeToRender(),p=h[0],R=h[1],T=h[2],O=h[3];this._callOnItemsRendered(p,R,T,O)}}if(typeof this.props.onScroll=="function"){var n=this.state,d=n.scrollDirection,f=n.scrollOffset,_=n.scrollUpdateWasRequested;this._callOnScroll(d,f,_)}},E._getRangeToRender=function(){var o=this.props,h=o.itemCount,p=o.overscanCount,R=this.state,T=R.isScrolling,O=R.scrollDirection,n=R.scrollOffset;if(h===0)return[0,0,0,0];var d=s(this.props,n,this._instanceProps),f=u(this.props,d,n,this._instanceProps),_=!T||O==="backward"?Math.max(1,p):1,x=!T||O==="forward"?Math.max(1,p):1;return[Math.max(0,d-_),Math.max(0,Math.min(h-1,f+x)),d,f]},I}(re.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var Re=function(e,t){var r=e.children,i=e.direction,l=e.height,s=e.layout,u=e.innerTagName,c=e.outerTagName,S=e.width,v=t.instance;if(!1)var w},xe=50,J=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 S=s[u];c=S.offset+S.size}for(var v=u+1;v<=t;v++){var w=l(v);s[v]={offset:c,size:w},c+=w}r.lastMeasuredIndex=t}return s[t]},m=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=J(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&&J(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 S=r-s-1,v=S*l;return u+v},pe=we({getItemOffset:function(e,t,r){return J(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:Z,getOffsetForIndexAndAlignment:function(e,t,r,i,l,s){var u=e.direction,c=e.height,S=e.layout,v=e.width,w=u==="horizontal"||S==="horizontal",I=w?v:c,E=J(e,t,l),N=Z(e,l),o=Math.max(0,Math.min(N-I,E.offset)),h=Math.max(0,E.offset-I+E.size+s);switch(r==="smart"&&(i>=h-I&&i<=o+I?r="auto":r="center"),r){case"start":return o;case"end":return h;case"center":return Math.round(h+(o-h)/2);case"auto":default:return i>=h&&i<=o?i:i<h?h:o}},getStartIndexForOffset:function(e,t,r){return m(e,r,t)},getStopIndexForStartIndex:function(e,t,r,i){for(var l=e.direction,s=e.height,u=e.itemCount,c=e.layout,S=e.width,v=l==="horizontal"||c==="horizontal",w=v?S:s,I=J(e,t,i),E=r+w,N=I.offset+I.size,o=t;o<u-1&&N<E;)o++,N+=J(e,o,i).size;return o},initInstanceProps:function(e,t){var r=e,i=r.estimatedItemSize,l={itemMetadataMap:{},estimatedItemSize:i||xe,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=g({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,S=e.width,v=Math.max(0,u*c-S),w=Math.min(v,t*c),I=Math.max(0,t*c-S+s+c);switch(r==="smart"&&(i>=I-S&&i<=w+S?r="auto":r="center"),r){case"start":return w;case"end":return I;case"center":var E=Math.round(I+(w-I)/2);return E<Math.ceil(S/2)?0:E>v+Math.floor(S/2)?v:E;case"auto":default:return i>=I&&i<=w?i:I>w||i<I?I:w}},getOffsetForRowAndAlignment:function(e,t,r,i,l,s){var u=e.rowHeight,c=e.height,S=e.rowCount,v=Math.max(0,S*u-c),w=Math.min(v,t*u),I=Math.max(0,t*u-c+s+u);switch(r==="smart"&&(i>=I-c&&i<=w+c?r="auto":r="center"),r){case"start":return w;case"end":return I;case"center":var E=Math.round(I+(w-I)/2);return E<Math.ceil(c/2)?0:E>v+Math.floor(c/2)?v:E;case"auto":default:return i>=I&&i<=w?i:I>w||i<I?I:w}},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,l,s){var u=e.direction,c=e.height,S=e.itemCount,v=e.itemSize,w=e.layout,I=e.width,E=u==="horizontal"||w==="horizontal",N=E?I:c,o=Math.max(0,S*v-N),h=Math.min(o,t*v),p=Math.max(0,t*v-N+v+s);switch(r==="smart"&&(i>=p-N&&i<=h+N?r="auto":r="center"),r){case"start":return h;case"end":return p;case"center":{var R=Math.round(p+(h-p)/2);return R<Math.ceil(N/2)?0:R>o+Math.floor(N/2)?o:R}case"auto":default:return i>=p&&i<=h?i:i<p?p:h}},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,S=e.width,v=i==="horizontal"||c==="horizontal",w=t*u,I=v?S:l,E=Math.ceil((I+r-w)/u);return Math.max(0,Math.min(s-1,t+E-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)}},46212:function(Le,_e,V){V.d(_e,{Z:function(){return Y}});function Y({onlyFirst:de=!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,de?void 0:"g")}}}]);})();
2
+
3
+ //# sourceMappingURL=5869.4dc32277.chunk.js.map