@techdocs/cli 1.10.6-next.0 → 1.10.6-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/embedded-app/.config-schema.json +46 -114
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{123.236c77e6.chunk.js → 123.c7a9a606.chunk.js} +1 -1
- package/dist/embedded-app/static/{1659.0a0397a7.chunk.js → 1659.e675bf84.chunk.js} +1 -1
- package/dist/embedded-app/static/{4445.f328dda2.chunk.js → 4445.b9a2649d.chunk.js} +2 -2
- package/dist/embedded-app/static/{4445.f328dda2.chunk.js.map → 4445.b9a2649d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4587.bb59a5f0.chunk.js → 4587.d2528dda.chunk.js} +1 -1
- package/dist/embedded-app/static/main.654208fc.js +523 -0
- package/dist/embedded-app/static/main.654208fc.js.map +1 -0
- package/dist/embedded-app/static/main.f25a5e82.css +2 -0
- package/dist/embedded-app/static/main.f25a5e82.css.map +1 -0
- package/dist/embedded-app/static/{runtime.6118bf91.js → runtime.49204185.js} +2 -2
- package/dist/embedded-app/static/{runtime.6118bf91.js.map → runtime.49204185.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.b660c175.js → vendor.3550487b.js} +2 -2
- package/dist/embedded-app/static/vendor.3550487b.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +5 -5
- package/dist/embedded-app/static/main.55438749.js +0 -523
- package/dist/embedded-app/static/main.55438749.js.map +0 -1
- package/dist/embedded-app/static/main.c62196a4.css +0 -2
- package/dist/embedded-app/static/main.c62196a4.css.map +0 -1
- package/dist/embedded-app/static/vendor.b660c175.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.10.6-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/cli-common@0.2.0-next.1
|
|
9
|
+
- @backstage/plugin-techdocs-node@1.14.3-next.1
|
|
10
|
+
- @backstage/backend-defaults@0.16.0-next.1
|
|
11
|
+
- @backstage/catalog-model@1.7.6
|
|
12
|
+
- @backstage/config@1.3.6
|
|
13
|
+
|
|
3
14
|
## 1.10.6-next.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -106,31 +106,6 @@
|
|
|
106
106
|
},
|
|
107
107
|
"path": "../cli/package.json"
|
|
108
108
|
},
|
|
109
|
-
{
|
|
110
|
-
"path": "../../plugins/permission-common/config.d.ts",
|
|
111
|
-
"value": {
|
|
112
|
-
"type": "object",
|
|
113
|
-
"properties": {
|
|
114
|
-
"permission": {
|
|
115
|
-
"description": "Configuration options for Backstage permissions and authorization",
|
|
116
|
-
"type": "object",
|
|
117
|
-
"properties": {
|
|
118
|
-
"enabled": {
|
|
119
|
-
"description": "Whether authorization is enabled in Backstage. Defaults to false, which means authorization\nrequests will be automatically allowed without invoking the authorization policy.",
|
|
120
|
-
"visibility": "frontend",
|
|
121
|
-
"type": "boolean"
|
|
122
|
-
},
|
|
123
|
-
"EXPERIMENTAL_enableBatchedRequests": {
|
|
124
|
-
"visibility": "frontend",
|
|
125
|
-
"type": "boolean"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
131
|
-
},
|
|
132
|
-
"packageName": "@backstage/plugin-permission-common"
|
|
133
|
-
},
|
|
134
109
|
{
|
|
135
110
|
"path": "../core-app-api/config.d.ts",
|
|
136
111
|
"value": {
|
|
@@ -466,35 +441,29 @@
|
|
|
466
441
|
"packageName": "@backstage/plugin-techdocs"
|
|
467
442
|
},
|
|
468
443
|
{
|
|
469
|
-
"path": "../../plugins/
|
|
444
|
+
"path": "../../plugins/permission-common/config.d.ts",
|
|
470
445
|
"value": {
|
|
471
446
|
"type": "object",
|
|
472
447
|
"properties": {
|
|
473
|
-
"
|
|
448
|
+
"permission": {
|
|
449
|
+
"description": "Configuration options for Backstage permissions and authorization",
|
|
474
450
|
"type": "object",
|
|
475
451
|
"properties": {
|
|
476
|
-
"
|
|
477
|
-
"
|
|
478
|
-
"
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"type": "boolean"
|
|
489
|
-
}
|
|
490
|
-
]
|
|
452
|
+
"enabled": {
|
|
453
|
+
"description": "Whether authorization is enabled in Backstage. Defaults to false, which means authorization\nrequests will be automatically allowed without invoking the authorization policy.",
|
|
454
|
+
"visibility": "frontend",
|
|
455
|
+
"type": "boolean"
|
|
456
|
+
},
|
|
457
|
+
"EXPERIMENTAL_enableBatchedRequests": {
|
|
458
|
+
"visibility": "frontend",
|
|
459
|
+
"type": "boolean"
|
|
491
460
|
}
|
|
492
461
|
}
|
|
493
462
|
}
|
|
494
463
|
},
|
|
495
464
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
496
465
|
},
|
|
497
|
-
"packageName": "@backstage/plugin-
|
|
466
|
+
"packageName": "@backstage/plugin-permission-common"
|
|
498
467
|
},
|
|
499
468
|
{
|
|
500
469
|
"path": "../integration/config.d.ts",
|
|
@@ -517,35 +486,8 @@
|
|
|
517
486
|
"visibility": "frontend",
|
|
518
487
|
"type": "string"
|
|
519
488
|
},
|
|
520
|
-
"token": {
|
|
521
|
-
"description": "Token used to authenticate requests.",
|
|
522
|
-
"visibility": "secret",
|
|
523
|
-
"deprecated": "Use `credentials` instead.",
|
|
524
|
-
"type": "string"
|
|
525
|
-
},
|
|
526
|
-
"credential": {
|
|
527
|
-
"description": "The credential to use for requests.\n\nIf no credential is specified anonymous access is used.",
|
|
528
|
-
"deepVisibility": "secret",
|
|
529
|
-
"deprecated": "Use `credentials` instead.",
|
|
530
|
-
"type": "object",
|
|
531
|
-
"properties": {
|
|
532
|
-
"clientId": {
|
|
533
|
-
"type": "string"
|
|
534
|
-
},
|
|
535
|
-
"clientSecret": {
|
|
536
|
-
"type": "string"
|
|
537
|
-
},
|
|
538
|
-
"tenantId": {
|
|
539
|
-
"type": "string"
|
|
540
|
-
},
|
|
541
|
-
"personalAccessToken": {
|
|
542
|
-
"type": "string"
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
},
|
|
546
489
|
"credentials": {
|
|
547
490
|
"description": "The credentials to use for requests. If multiple credentials are specified the first one that matches the organization is used.\nIf no organization matches the first credential without an organization is used.\n\nIf no credentials are specified at all, either a default credential (for Azure DevOps) or anonymous access (for Azure DevOps Server) is used.",
|
|
548
|
-
"deepVisibility": "secret",
|
|
549
491
|
"type": "array",
|
|
550
492
|
"items": {
|
|
551
493
|
"type": "object",
|
|
@@ -560,12 +502,14 @@
|
|
|
560
502
|
"type": "string"
|
|
561
503
|
},
|
|
562
504
|
"clientSecret": {
|
|
505
|
+
"visibility": "secret",
|
|
563
506
|
"type": "string"
|
|
564
507
|
},
|
|
565
508
|
"tenantId": {
|
|
566
509
|
"type": "string"
|
|
567
510
|
},
|
|
568
511
|
"personalAccessToken": {
|
|
512
|
+
"visibility": "secret",
|
|
569
513
|
"type": "string"
|
|
570
514
|
},
|
|
571
515
|
"managedIdentityClientId": {
|
|
@@ -621,7 +565,6 @@
|
|
|
621
565
|
},
|
|
622
566
|
"aadCredential": {
|
|
623
567
|
"description": "Optional credential to use for Azure Active Directory authentication.",
|
|
624
|
-
"deepVisibility": "secret",
|
|
625
568
|
"type": "object",
|
|
626
569
|
"properties": {
|
|
627
570
|
"clientId": {
|
|
@@ -634,6 +577,7 @@
|
|
|
634
577
|
},
|
|
635
578
|
"clientSecret": {
|
|
636
579
|
"description": "The client secret for the Azure AD application.",
|
|
580
|
+
"visibility": "secret",
|
|
637
581
|
"type": "string"
|
|
638
582
|
}
|
|
639
583
|
},
|
|
@@ -646,49 +590,6 @@
|
|
|
646
590
|
}
|
|
647
591
|
}
|
|
648
592
|
},
|
|
649
|
-
"bitbucket": {
|
|
650
|
-
"description": "Integration configuration for Bitbucket",
|
|
651
|
-
"deprecated": "replaced by bitbucketCloud and bitbucketServer",
|
|
652
|
-
"type": "array",
|
|
653
|
-
"items": {
|
|
654
|
-
"type": "object",
|
|
655
|
-
"properties": {
|
|
656
|
-
"host": {
|
|
657
|
-
"description": "The hostname of the given Bitbucket instance",
|
|
658
|
-
"visibility": "frontend",
|
|
659
|
-
"type": "string"
|
|
660
|
-
},
|
|
661
|
-
"token": {
|
|
662
|
-
"description": "Token used to authenticate requests.",
|
|
663
|
-
"visibility": "secret",
|
|
664
|
-
"type": "string"
|
|
665
|
-
},
|
|
666
|
-
"apiBaseUrl": {
|
|
667
|
-
"description": "The base url for the Bitbucket API, for example https://api.bitbucket.org/2.0",
|
|
668
|
-
"visibility": "frontend",
|
|
669
|
-
"type": "string"
|
|
670
|
-
},
|
|
671
|
-
"username": {
|
|
672
|
-
"description": "The username to use for authenticated requests.",
|
|
673
|
-
"visibility": "secret",
|
|
674
|
-
"type": "string"
|
|
675
|
-
},
|
|
676
|
-
"appPassword": {
|
|
677
|
-
"description": "Bitbucket app password used to authenticate requests.",
|
|
678
|
-
"visibility": "secret",
|
|
679
|
-
"type": "string"
|
|
680
|
-
},
|
|
681
|
-
"commitSigningKey": {
|
|
682
|
-
"description": "PGP signing key for signing commits.",
|
|
683
|
-
"visibility": "secret",
|
|
684
|
-
"type": "string"
|
|
685
|
-
}
|
|
686
|
-
},
|
|
687
|
-
"required": [
|
|
688
|
-
"host"
|
|
689
|
-
]
|
|
690
|
-
}
|
|
691
|
-
},
|
|
692
593
|
"bitbucketCloud": {
|
|
693
594
|
"description": "Integration configuration for Bitbucket Cloud",
|
|
694
595
|
"type": "array",
|
|
@@ -1092,6 +993,37 @@
|
|
|
1092
993
|
},
|
|
1093
994
|
"packageName": "@backstage/integration"
|
|
1094
995
|
},
|
|
996
|
+
{
|
|
997
|
+
"path": "../../plugins/catalog/config.d.ts",
|
|
998
|
+
"value": {
|
|
999
|
+
"type": "object",
|
|
1000
|
+
"properties": {
|
|
1001
|
+
"catalog": {
|
|
1002
|
+
"type": "object",
|
|
1003
|
+
"properties": {
|
|
1004
|
+
"experimentalPagination": {
|
|
1005
|
+
"deepVisibility": "frontend",
|
|
1006
|
+
"anyOf": [
|
|
1007
|
+
{
|
|
1008
|
+
"type": "object",
|
|
1009
|
+
"properties": {
|
|
1010
|
+
"limit": {
|
|
1011
|
+
"type": "number"
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"type": "boolean"
|
|
1017
|
+
}
|
|
1018
|
+
]
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1024
|
+
},
|
|
1025
|
+
"packageName": "@backstage/plugin-catalog"
|
|
1026
|
+
},
|
|
1095
1027
|
{
|
|
1096
1028
|
"path": "../frontend-app-api/config.d.ts",
|
|
1097
1029
|
"value": {
|
|
@@ -1,4 +1,4 @@
|
|
|
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="color-scheme" content="light dark"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><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><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="color-scheme" content="light dark"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><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><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.49204185.js"></script><script defer="defer" src="/static/module-material-ui.31647b41.js"></script><script defer="defer" src="/static/module-lodash.c8595dcc.js"></script><script defer="defer" src="/static/module-react-aria.2ae7b382.js"></script><script defer="defer" src="/static/module-ajv.ac283755.js"></script><script defer="defer" src="/static/module-mui.9c07ad9e.js"></script><script defer="defer" src="/static/module-micromark-core-commonmark.d049c8fc.js"></script><script defer="defer" src="/static/module-parse5.94980036.js"></script><script defer="defer" src="/static/module-zod.60f202c8.js"></script><script defer="defer" src="/static/module-react-dom.c631e87d.js"></script><script defer="defer" src="/static/module-react-hook-form.1d49754b.js"></script><script defer="defer" src="/static/module-i18next.c154323c.js"></script><script defer="defer" src="/static/module-remixicon.bd2a125c.js"></script><script defer="defer" src="/static/module-remix-run.0c80eb31.js"></script><script defer="defer" src="/static/vendor.3550487b.js"></script><script defer="defer" src="/static/main.654208fc.js"></script><link href="/static/main.f25a5e82.css" rel="stylesheet"><script type="backstage.io/config">[
|
|
2
2
|
{
|
|
3
3
|
"context": "app-config.yaml",
|
|
4
4
|
"data": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
color="#5bbad5"
|
|
44
44
|
/>
|
|
45
45
|
<title><%= config.getString('app.title') %></title>
|
|
46
|
-
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.
|
|
46
|
+
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.49204185.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.31647b41.js"></script><script defer src="<%= publicPath %>/static/module-lodash.c8595dcc.js"></script><script defer src="<%= publicPath %>/static/module-react-aria.2ae7b382.js"></script><script defer src="<%= publicPath %>/static/module-ajv.ac283755.js"></script><script defer src="<%= publicPath %>/static/module-mui.9c07ad9e.js"></script><script defer src="<%= publicPath %>/static/module-micromark-core-commonmark.d049c8fc.js"></script><script defer src="<%= publicPath %>/static/module-parse5.94980036.js"></script><script defer src="<%= publicPath %>/static/module-zod.60f202c8.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.c631e87d.js"></script><script defer src="<%= publicPath %>/static/module-react-hook-form.1d49754b.js"></script><script defer src="<%= publicPath %>/static/module-i18next.c154323c.js"></script><script defer src="<%= publicPath %>/static/module-remixicon.bd2a125c.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.0c80eb31.js"></script><script defer src="<%= publicPath %>/static/vendor.3550487b.js"></script><script defer src="<%= publicPath %>/static/main.654208fc.js"></script><link href="<%= publicPath %>/static/main.f25a5e82.css" rel="stylesheet"></head>
|
|
47
47
|
<body>
|
|
48
48
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
49
49
|
<div id="root"></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["123"],{79894(a){a.exports=JSON.parse('{"name":"@backstage/plugin-catalog","version":"1.
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["123"],{79894(a){a.exports=JSON.parse('{"name":"@backstage/plugin-catalog","version":"1.34.0-next.1","description":"The Backstage plugin for browsing the Backstage catalog","backstage":{"role":"frontend-plugin","pluginId":"catalog","pluginPackages":["@backstage/plugin-catalog","@backstage/plugin-catalog-backend","@backstage/plugin-catalog-common","@backstage/plugin-catalog-node","@backstage/plugin-catalog-react"]},"publishConfig":{"access":"public"},"keywords":["backstage"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/catalog"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.ts","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.ts"],"package.json":["package.json"]}},"files":["dist","config.d.ts"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/catalog-client":"workspace:^","@backstage/catalog-model":"workspace:^","@backstage/core-compat-api":"workspace:^","@backstage/core-components":"workspace:^","@backstage/core-plugin-api":"workspace:^","@backstage/errors":"workspace:^","@backstage/frontend-plugin-api":"workspace:^","@backstage/integration-react":"workspace:^","@backstage/plugin-catalog-common":"workspace:^","@backstage/plugin-catalog-react":"workspace:^","@backstage/plugin-permission-react":"workspace:^","@backstage/plugin-scaffolder-common":"workspace:^","@backstage/plugin-search-common":"workspace:^","@backstage/plugin-search-react":"workspace:^","@backstage/plugin-techdocs-common":"workspace:^","@backstage/plugin-techdocs-react":"workspace:^","@backstage/types":"workspace:^","@backstage/ui":"workspace:^","@backstage/version-bridge":"workspace:^","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@mui/utils":"^5.14.15","classnames":"^2.3.1","dataloader":"^2.0.0","history":"^5.0.0","lodash":"^4.17.21","pluralize":"^8.0.0","react-helmet":"6.1.0","react-use":"^17.2.4","zen-observable":"^0.10.0"},"devDependencies":{"@backstage/cli":"workspace:^","@backstage/core-app-api":"workspace:^","@backstage/dev-utils":"workspace:^","@backstage/frontend-test-utils":"workspace:^","@backstage/plugin-permission-common":"workspace:^","@backstage/test-utils":"workspace:^","@testing-library/dom":"^10.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/pluralize":"^0.0.33","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2","swr":"^2.2.5"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"configSchema":"config.d.ts"}')}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1659"],{23494(e){e.exports=JSON.parse('{"name":"@backstage/plugin-techdocs","version":"1.17.1-next.
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1659"],{23494(e){e.exports=JSON.parse('{"name":"@backstage/plugin-techdocs","version":"1.17.1-next.1","description":"The Backstage plugin that renders technical documentation for your components","backstage":{"role":"frontend-plugin","pluginId":"techdocs","pluginPackages":["@backstage/plugin-techdocs","@backstage/plugin-techdocs-backend","@backstage/plugin-techdocs-common","@backstage/plugin-techdocs-node","@backstage/plugin-techdocs-react"]},"publishConfig":{"access":"public"},"keywords":["backstage","techdocs"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/techdocs"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.tsx","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.tsx"],"package.json":["package.json"]}},"files":["dist","config.d.ts"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/catalog-client":"workspace:^","@backstage/catalog-model":"workspace:^","@backstage/config":"workspace:^","@backstage/core-components":"workspace:^","@backstage/core-plugin-api":"workspace:^","@backstage/errors":"workspace:^","@backstage/frontend-plugin-api":"workspace:^","@backstage/integration":"workspace:^","@backstage/integration-react":"workspace:^","@backstage/plugin-auth-react":"workspace:^","@backstage/plugin-catalog-react":"workspace:^","@backstage/plugin-search-common":"workspace:^","@backstage/plugin-search-react":"workspace:^","@backstage/plugin-techdocs-common":"workspace:^","@backstage/plugin-techdocs-react":"workspace:^","@backstage/theme":"workspace:^","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@material-ui/styles":"^4.10.0","@microsoft/fetch-event-source":"^2.0.1","dompurify":"^3.2.4","git-url-parse":"^15.0.0","lodash":"^4.17.21","react-helmet":"6.1.0","react-use":"^17.2.4"},"devDependencies":{"@backstage/cli":"workspace:^","@backstage/core-app-api":"workspace:^","@backstage/dev-utils":"workspace:^","@backstage/plugin-catalog":"workspace:^","@backstage/plugin-techdocs-module-addons-contrib":"workspace:^","@backstage/test-utils":"workspace:^","@testing-library/dom":"^10.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/dompurify":"^3.0.0","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"configSchema":"config.d.ts"}')}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["4445"],{280(e,t,n){n.d(t,{m:()=>d,v:()=>p});var i=n(31085),a=n(29365),r=n(71677),l=n(72501),s=n(58837),o=n(55940);let c=(0,s.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function d(e){let{isFavorite:t}=e,n=c();return(0,i.jsx)(l.A,{component:"span",className:t?n.icon:n.iconBorder,children:t?(0,i.jsx)(o.Gg,{}):(0,i.jsx)(o.KG,{})})}function p(e){let{id:t,title:n,isFavorite:l,onToggle:s,...o}=e;return(0,i.jsx)(r.Ay,{id:t,title:n,children:(0,i.jsx)(a.A,{"aria-label":n,id:t,onClick:()=>s(!l),color:"inherit",...o,children:(0,i.jsx)(d,{isFavorite:l})})})}},7537(e,t,n){n.d(t,{S:()=>l,Z:()=>s});var i=n(11773),a=n(46123),r=n.n(a);function l(e,t){let n,a,r,l=t?.defaultKind;return"metadata"in e?(n=e.kind,a=e.metadata.namespace,r=e.metadata.name):(n=e.kind,a=e.namespace,r=e.name),(void 0===a||""===a)&&(a=i.oQ),t?.defaultNamespace!==void 0?t?.defaultNamespace===a&&(a=void 0):a===i.oQ&&(a=void 0),n=n.toLocaleLowerCase("en-US"),n=l&&l.toLocaleLowerCase("en-US")===n?void 0:n,`${n?`${n}:`:""}${a?`${a}/`:""}${r}`}function s(e,t){for(let t of["spec.profile.displayName","metadata.title"]){let n=r()(e,t);if(n&&"string"==typeof n)return n}return t}},48764(e,t,n){n.d(t,{EntityLayout:()=>t4});var i,a,r=n(31085),l=n(48209),s=n(65605),o=n(90615),c=n(62335),d=n(89595),p=n(12439),u=n(55489),h=n(84391),x=n(87187),g=n(60603),m=n(15448),f=n(22845),y=n(50010),j=n(14041),b=n(18690),v=n(73657),A=n(73466),k=n(58837),w=n(77125),E=n(4103),T=n(70111),C=n(50509),S=n(81219),N=n(11773),L=n(26958),B=n(58077),R=n(769);function $(e){return"string"==typeof e?e:(0,B.U2)(e)}var D=n(79811),M=n(280);let P=e=>{let{toggleStarredEntity:t,isStarredEntity:n}=function(e){let t=(0,C.gf)(R.a),[n,i]=(0,j.useState)(!1);return(0,j.useEffect)(()=>{let n=t.starredEntitie$().subscribe({next(t){i(t.has($(e)))}});return()=>{n.unsubscribe()}},[e,t]),{toggleStarredEntity:(0,j.useCallback)(()=>t.toggleStarred($(e)).then(),[e,t]),isStarredEntity:n}}(e.entity),{t:i}=(0,d.i)(D.j),a=i(n?"favoriteEntity.removeFromFavorites":"favoriteEntity.addToFavorites"),l=`favorite-${(0,B.U2)(e.entity).replace(/[^a-zA-Z0-9-_]/g,"-")}`;return(0,r.jsx)(M.v,{title:a,id:l,isFavorite:n,onToggle:t,...e})};var O=n(76272),I=n(3438),U=n(64947),_=n(76891),W=n(93453),F=n(46805),z=n(61477),G=n(38605),H=n(74953),K=n(97673),Y=n(37238),Q=n(53373),X=n.n(Q),V=n(45250),Z=n(68510),q=n(67566),J=n(41809),ee=n(57586),et=n.n(ee),en=n(12784),ei=n.n(en);(i=a||(a={})).Direction={TOP_BOTTOM:"TB",BOTTOM_TOP:"BT",LEFT_RIGHT:"LR",RIGHT_LEFT:"RL"},i.Alignment={UP_LEFT:"UL",UP_RIGHT:"UR",DOWN_LEFT:"DL",DOWN_RIGHT:"DR"},i.Ranker={NETWORK_SIMPLEX:"network-simplex",TIGHT_TREE:"tight-tree",LONGEST_PATH:"longest-path"},i.LabelPosition={LEFT:"l",RIGHT:"r",CENTER:"c"};var ea=n(22249);let er=(0,k.A)(e=>({node:{fill:e.palette.primary.light,stroke:e.palette.primary.light},text:{fill:e.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function el({node:{id:e}}){let t=er(),[n,i]=(0,j.useState)(0),[a,l]=(0,j.useState)(0),s=(0,j.useRef)(null);(0,j.useLayoutEffect)(()=>{if(s.current){let{height:e,width:t}=s.current.getBBox();e=Math.round(e),t=Math.round(t),(e!==a||t!==n)&&(i(t),l(e))}},[n,a]);let o=n+20,c=a+20;return(0,r.jsxs)("g",{children:[(0,r.jsx)("rect",{className:t.node,width:o,height:c,rx:10}),(0,r.jsx)("text",{ref:s,className:t.text,y:c/2,x:o/2,textAnchor:"middle",alignmentBaseline:"middle",children:e})]})}let es=(0,ea.default)(e=>({node:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),eo=e=>(0,r.jsx)(el,{...e});function ec({render:e=eo,setNode:t,node:n}){let{width:i,height:a,x:l=0,y:s=0}=n,o=es(),c=(0,j.useRef)(null);return(0,j.useLayoutEffect)(()=>{if(c.current){let{height:e,width:r}=c.current.getBBox();e=Math.round(e),r=Math.round(r),(e!==a||r!==i)&&t(n.id,{...n,height:e,width:r})}},[n,i,a,t]),(0,r.jsx)("g",{ref:c,"data-testid":"node",className:o.node,transform:`translate(${l-i/2},${s-a/2})`,children:e({node:n})})}var ed=n(1121),ep=n(12895),eu=n(20644),eh=n.n(eu);let ex="arrow-marker",eg=(0,ea.default)(e=>({text:{fill:e.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function em({edge:{label:e}}){let t=eg();return(0,r.jsx)("text",{className:t.text,textAnchor:"middle",children:e})}let ef=(0,ea.default)(e=>({path:{strokeWidth:1.3,stroke:e.palette.textSubtle,fill:"none",transition:`${e.transitions.duration.shortest}ms`},label:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),ey=e=>(0,r.jsx)(em,{...e});function ej({render:e=ey,setEdge:t,id:n,edge:i,curve:a,showArrowHeads:l}){let{x:s=0,y:o=0,width:c,height:d,points:p}=i,u=ef(),h=(0,j.useRef)(null);(0,j.useLayoutEffect)(()=>{if(h.current){let{height:e,width:a}=h.current.getBBox();e=Math.round(e),a=Math.round(a),(e!==d||a!==c)&&t(n,{...i,height:e,width:a})}},[i,d,c,t,n]);let x="",g=(0,j.useMemo)(()=>ed.A().x(e=>e.x).y(e=>e.y).curve(ep[a]),[a]);return p&&(x=g(p.filter(e=>eh()(e.x)&&eh()(e.y)))||""),(0,r.jsxs)(r.Fragment,{children:[x&&(0,r.jsx)("path",{"data-testid":"edge",className:u.path,markerEnd:l?`url(#${ex})`:void 0,d:x}),i.label?(0,r.jsx)("g",{ref:h,"data-testid":"label",className:u.label,transform:`translate(${s},${o})`,children:e({edge:i})}):null]})}var eb=n(29365),ev=n(25828),eA=n(63988),ek=n(14112),ew=n(71677),eE=n(89332);let eT=(0,k.A)(e=>({fullscreenButton:{position:"absolute",right:0},root:{overflow:"hidden",minHeight:"100%",minWidth:"100%"},fixedHeight:{maxHeight:"100%"},fullscreen:{backgroundColor:e.palette.background.paper}})),eC="workspace",eS="dependency-graph";function eN(e){let{edges:t,nodes:n,renderNode:i,direction:l=a.Direction.TOP_BOTTOM,align:s,nodeMargin:o=50,edgeMargin:c=10,rankMargin:p=50,paddingX:u=0,paddingY:h=0,acyclicer:x,ranker:g=a.Ranker.NETWORK_SIMPLEX,labelPosition:m=a.LabelPosition.RIGHT,labelOffset:f=10,edgeRanks:y=1,edgeWeight:b=1,renderEdge:v,renderLabel:A,defs:k,zoom:w="enabled",curve:E="curveMonotoneX",showArrowHeads:T=!1,fit:C="grow",allowFullscreen:S=!0,...N}=e,L=(0,J.default)(),[B,R]=(0,j.useState)(100),[$,D]=(0,j.useState)(100),M=(0,ek.V)(),P=eT(),{t:O}=(0,d.i)(eE.O),I=(0,j.useRef)(new(et()).graphlib.Graph),[U,_]=(0,j.useState)(I.current.graph()?.width||0),[W,F]=(0,j.useState)(I.current.graph()?.height||0),[z,G]=(0,j.useState)([]),[H,K]=(0,j.useState)([]),Q=Math.max(U,B),ee=Math.max(W,$),[en]=(0,Y.A)(),ea=(0,V.once)(en),er="grow"!==C||M.active?"100%":ee,el=(0,j.useMemo)(()=>ei()(e=>{if(!e)return;ea(e);let t=e.querySelector(`svg#${eS}`);if(!t)return;let n=q.A(t),i=q.A(t.getElementById(eC));function a(){n.call(Z.s_().scaleExtent([1,1/0]).on("zoom",e=>{e.transform.x=Math.min(0,Math.max(e.transform.x,Q-Q*e.transform.k)),e.transform.y=Math.min(0,Math.max(e.transform.y,ee-ee*e.transform.k)),i.attr("transform",e.transform)}))}"enabled"===w?a():"enable-on-click"===w&&n.on("click",()=>a());let{width:r,height:l}=e.getBoundingClientRect();B!==r&&r<=Q&&R(r),$!==l&&l<=ee&&D(l)},100),[ea,$,B,Q,ee,w]),es=(0,j.useCallback)(()=>{let e=I.current.nodes(),i=I.current.edges();e.forEach(e=>{n.some(t=>t.id===e)||I.current.removeNode(e)}),i.forEach(e=>{t.some(t=>t.from===e.v&&t.to===e.w)||I.current.removeEdge(e.v,e.w)}),n.forEach(e=>{let t=I.current.nodes().find(t=>e.id===t);if(t&&I.current.node(t)){let{width:n,height:i,x:a,y:r}=I.current.node(t);I.current.setNode(t,{...e,width:n,height:i,x:a,y:r})}else I.current.setNode(e.id,{...e,width:0,height:0})}),t.forEach(e=>{I.current.setEdge(e.from,e.to,{...e,label:e.label,width:0,height:0,labelpos:m,labeloffset:f,weight:b,minlen:y})})},[t,n,m,f,b,y]),eo=(0,j.useMemo)(()=>ei()(()=>{et().layout(I.current);let{height:e,width:t}=I.current.graph(),n=Math.max(0,e||0);_(Math.max(0,t||0)),F(n),G(I.current.nodes()),K(I.current.edges())},250,{leading:!0}),[]);(0,j.useEffect)(()=>(I.current.setGraph({rankdir:l,align:s,nodesep:o,edgesep:c,ranksep:p,marginx:u,marginy:h,acyclicer:x,ranker:g}),es(),eo(),eo.cancel),[x,s,l,c,u,h,o,p,g,es,eo]);let ed=(0,j.useCallback)((e,t)=>(I.current.setNode(e,t),eo(),I.current),[eo]),ep=(0,j.useCallback)((e,t)=>(I.current.setEdge(e,t),eo(),I.current),[eo]);return(0,r.jsxs)(ek.m,{handle:M,className:X()(M.active?P.fullscreen:P.root),children:[S&&(0,r.jsx)(ew.Ay,{title:O("dependencyGraph.fullscreenTooltip"),children:(0,r.jsx)(eb.A,{className:P.fullscreenButton,onClick:M.active?M.exit:M.enter,children:M.active?(0,r.jsx)(eA.default,{}):(0,r.jsx)(ev.default,{})})}),(0,r.jsx)("div",{ref:el,style:{width:"100%",height:"100%"},children:(0,r.jsxs)("svg",{...N,width:"100%",height:er,viewBox:`0 0 ${Q} ${ee}`,id:eS,children:[(0,r.jsxs)("defs",{children:[(0,r.jsx)("marker",{id:ex,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth",children:(0,r.jsx)("path",{fill:L.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),k]}),(0,r.jsx)("g",{id:eC,children:(0,r.jsxs)("svg",{width:U,height:W,y:ee/2-W/2,x:Q/2-U/2,viewBox:`0 0 ${U} ${W}`,children:[H.map(e=>{let t=I.current.edge(e);return t?v?v({edge:t,id:e}):(0,r.jsx)(ej,{id:e,setEdge:ep,render:A,edge:t,curve:E,showArrowHeads:T},`${e.v}-${e.w}`):null}),z.map(e=>{let t=I.current.node(e);return t?(0,r.jsx)(ec,{setNode:ed,render:i,node:t},e):null})]})})]})})]})}var eL=n(91189),eB=n(59461),eR=n(7537);let e$=n(10437).A;function eD(e){let t,n,{kind:i,entityRef:a,...l}=e,s=(t=(0,eL.n)(),(n=function(e,t){if(e)return e.toLocaleLowerCase("en-US");if(t)try{return(0,B.KU)(t).kind.toLocaleLowerCase("en-US")}catch{}}(i,a))&&t.getSystemIcon(`kind:${n}`)||e$);return(0,r.jsx)(s,{...l})}let eM=(0,k.A)(e=>({node:{fill:e.palette.grey[300],stroke:e.palette.grey[300],"&.primary":{fill:e.palette.primary.light,stroke:e.palette.primary.light},"&.secondary":{fill:e.palette.secondary.light,stroke:e.palette.secondary.light}},text:{fill:e.palette.getContrastText(e.palette.grey[300]),"&.primary":{fill:e.palette.primary.contrastText},"&.secondary":{fill:e.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function eP({node:e}){let t=eM(),n=(0,b.useNavigate)(),i=(0,S.S)(m.s),[a,l]=(0,j.useState)(0),[s,o]=(0,j.useState)(0),c=(0,eL.n)(),d=(0,j.useRef)(null);(0,j.useLayoutEffect)(()=>{if(d.current){let{height:e,width:t}=d.current.getBBox();e=Math.round(e),t=Math.round(t),(e!==s||t!==a)&&(l(t),o(e))}},[a,s]);let p=c.getSystemIcon(`kind:${e.kind.toLocaleLowerCase("en-US")}`),u=p?s+10:0,h=s+20,x=e.metadata.title||(e.kind&&e.metadata.name&&e.metadata.namespace?(0,eR.S)({kind:e.kind,name:e.metadata.name,namespace:e.metadata.namespace||""}):e.id);return(0,r.jsxs)("g",{onClick:()=>{n(i({kind:e.kind,namespace:e.metadata.namespace||N.oQ,name:e.metadata.name}))},className:t.clickable,children:[(0,r.jsx)("rect",{className:X()(t.node,e.root?"secondary":"primary"),width:u+a+20,height:h,rx:10}),p&&(0,r.jsx)(eD,{kind:e.kind,y:10,x:10,width:s,height:s,className:X()(t.text,e.root?"secondary":"primary")}),(0,r.jsx)("text",{ref:d,className:X()(t.text,e.root?"secondary":"primary"),y:h/2,x:u+(a+20)/2,textAnchor:"middle",alignmentBaseline:"middle",children:x})]})}function eO(e){let{loading:t,error:n,nodes:i,edges:l}=function(e){let t=(0,C.gf)(O.v),n=(0,B.U2)(e),{loading:i,error:a,value:r}=(0,A.A)(async()=>{let e=await t.getEntityAncestors({entityRef:n}),i=[],a=[];for(let t of e.items){let n=(0,B.U2)(t.entity),r=n===e.rootEntityRef;for(let e of(i.push({id:n,root:r,...t.entity}),t.parentEntityRefs))a.push({from:n,to:e})}return{nodes:i,edges:a}},[n]);return{loading:i,error:a,nodes:r?.nodes||[],edges:r?.edges||[]}}(e.entity),{t:s}=(0,d.i)(D.j);return t?(0,r.jsx)(u.k,{}):n?(0,r.jsx)(K._,{error:n}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:s("inspectEntityDialog.ancestryPage.title")}),(0,r.jsx)(eB.A,{gutterBottom:!0,children:s("inspectEntityDialog.ancestryPage.description",{processorsLink:(0,r.jsx)(g.N_,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity",children:s("inspectEntityDialog.ancestryPage.processorsLink")})})}),(0,r.jsx)(w.A,{mt:4,children:(0,r.jsx)(eN,{nodes:i,edges:l,renderNode:eP,direction:a.Direction.BOTTOM_TOP,zoom:"enable-on-click"})})]})}var eI=n(16263),eU=n(58007),e_=n(8109),eW=n(40703),eF=n(48653),ez=n(46423),eG=n(5951),eH=n(62261),eK=n(72501),eY=n(97262);let eQ=(0,k.A)(e=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:e.spacing(2)},helpIcon:{marginLeft:e.spacing(1),color:e.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function eX(e){let t=eQ();return(0,r.jsx)(eG.A,{...e,primaryTypographyProps:{className:t.monospace},secondaryTypographyProps:{className:t.monospace}})}function eV(e){let t=eQ();return(0,r.jsx)(eH.A,{className:t.monospace,children:e.children})}function eZ(e){return(0,r.jsx)(w.A,{mt:2,children:(0,r.jsx)(eW.A,{variant:"outlined",children:(0,r.jsxs)(eF.A,{children:[(0,r.jsxs)(eK.A,{variant:"h6",gutterBottom:!0,children:[e.title,e.helpLink&&(0,r.jsx)(eJ,{to:e.helpLink})]}),e.children]})})})}function eq(e){let[t,n]=e.entry,i=n.match(/^url:https?:\/\//)?n.slice(4):n.match(/^https?:\/\//)?n:void 0;return(0,r.jsxs)(e_.A,{children:[e.indent&&(0,r.jsx)(ez.A,{}),(0,r.jsx)(eX,{primary:t,secondary:i?(0,r.jsx)(g.N_,{to:i,children:n}):n})]})}function eJ(e){let t=eQ();return(0,r.jsx)(g.N_,{to:e.to,className:t.helpIcon,children:(0,r.jsx)(eY.default,{fontSize:"inherit"})})}let e0=(0,k.A)({root:{display:"flex",flexDirection:"column"}});function e1(e){return(0,r.jsxs)(eU.A,{dense:!0,children:[e.header&&(0,r.jsx)(eq,{entry:e.header},"header"),e.entities.map(e=>(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:(0,r.jsx)(I.z,{entityRef:e})})},(0,B.U2)(e)))]})}function e2(e){let{entity:t}=e,{t:n}=(0,d.i)(D.j),{loading:i,error:a,location:s,originLocation:o,colocatedEntities:c}=function(e){let t=(0,C.gf)(O.v),n=(0,B.U2)(e),i=e.metadata.annotations?.[eI.Eo],a=e.metadata.annotations?.[eI.r2],{loading:r,error:l,value:s}=(0,A.A)(async()=>i||a?(await t.getEntities({filter:[...i?[{[`metadata.annotations.${eI.Eo}`]:i}]:[],...a?[{[`metadata.annotations.${eI.r2}`]:a}]:[]]})).items:[],[i,a]);return{loading:r,error:l,location:i,originLocation:a,colocatedEntities:s?.filter(e=>(0,B.U2)(e)!==n)}}(t);if(i)return(0,r.jsx)(u.k,{});if(a)return(0,r.jsx)(K._,{error:a});if(!s&&!o)return(0,r.jsx)(l.A,{severity:"warning",children:n("inspectEntityDialog.colocatedPage.alertNoLocation")});if(!c?.length)return(0,r.jsx)(l.A,{severity:"info",children:n("inspectEntityDialog.colocatedPage.alertNoEntity")});if(s===o)return(0,r.jsx)(e1,{entities:c});let p=c.filter(e=>e.metadata.annotations?.[eI.Eo]===s),h=c.filter(e=>e.metadata.annotations?.[eI.r2]===o);return(0,r.jsxs)(r.Fragment,{children:[p.length>0&&(0,r.jsx)(e1,{entities:p,header:[n("inspectEntityDialog.colocatedPage.locationHeader"),s]}),h.length>0&&(0,r.jsx)(e1,{entities:h,header:[n("inspectEntityDialog.colocatedPage.originHeader"),o]})]})}function e5(e){let t=e0(),{t:n}=(0,d.i)(D.j);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:n("inspectEntityDialog.colocatedPage.title")}),(0,r.jsx)(eB.A,{children:n("inspectEntityDialog.colocatedPage.description")}),(0,r.jsx)("div",{className:t.root,children:(0,r.jsx)(e2,{entity:e.entity})})]})}var e3=n(4809);function e7(e){return Object.fromEntries([...Object.entries(e)].sort((e,t)=>e[0]<t[0]?-1:1))}function e4(e){let{t}=(0,d.i)(D.j);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:t("inspectEntityDialog.jsonPage.title")}),(0,r.jsx)(eB.A,{children:t("inspectEntityDialog.jsonPage.description")}),(0,r.jsx)(eB.A,{children:(0,r.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,r.jsx)(e3.z,{text:JSON.stringify(e7(e.entity),void 0,2),language:"json",showCopyCodeButton:!0})})})]})}var e6=n(65569),e8=n(87809),e9=n.n(e8),te=n(40074),tt=n.n(te),tn=n(55555);let ti=(0,k.A)({root:{display:"flex",flexDirection:"column"}});function ta(e){let t=ti(),{apiVersion:n,kind:i,metadata:a,spec:l,relations:s=[],status:o={}}=e.entity,c=e9()(tt()(s,e=>e.targetRef),"type"),{t:p}=(0,d.i)(D.j),u=(0,B.U2)(e.entity);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:p("inspectEntityDialog.overviewPage.title")}),(0,r.jsxs)("div",{className:t.root,children:[(0,r.jsx)(eZ,{title:p("inspectEntityDialog.overviewPage.identity.title"),children:(0,r.jsxs)(eU.A,{dense:!0,children:[(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:"apiVersion",secondary:n})}),(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:"kind",secondary:i})}),l?.type&&(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:"spec.type",secondary:l.type?.toString()})}),a.uid&&(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(eX,{primary:"uid",secondary:a.uid}),(0,r.jsx)(e6.A,{children:(0,r.jsx)(tn.l,{text:a.uid})})]}),a.etag&&(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(eX,{primary:"etag",secondary:a.etag}),(0,r.jsx)(e6.A,{children:(0,r.jsx)(tn.l,{text:a.etag})})]}),(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(eX,{primary:"entityRef",secondary:u}),(0,r.jsx)(e6.A,{children:(0,r.jsx)(tn.l,{text:u})})]})]})}),(0,r.jsxs)(eZ,{title:p("inspectEntityDialog.overviewPage.metadata.title"),children:[!!Object.keys(a.annotations||{}).length&&(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsxs)(eV,{children:[p("inspectEntityDialog.overviewPage.annotations"),(0,r.jsx)(eJ,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"})]}),children:Object.entries(a.annotations).map(e=>(0,r.jsx)(eq,{indent:!0,entry:e},e[0]))}),!!Object.keys(a.labels||{}).length&&(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsx)(eV,{children:p("inspectEntityDialog.overviewPage.labels")}),children:Object.entries(a.labels).map(e=>(0,r.jsx)(eq,{indent:!0,entry:e},e[0]))}),!!a.tags?.length&&(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsx)(eV,{children:p("inspectEntityDialog.overviewPage.tags")}),children:a.tags.map((e,t)=>(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(ez.A,{}),(0,r.jsx)(eX,{primary:e})]},`${e}-${t}`))})]}),!!s.length&&(0,r.jsx)(eZ,{title:p("inspectEntityDialog.overviewPage.relation.title"),helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations",children:Object.entries(c).map(([e,t],n)=>(0,r.jsx)("div",{children:(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsx)(eV,{children:e}),children:t.map(e=>(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:(0,r.jsx)(I.z,{entityRef:e.targetRef})})},e.targetRef))})},n))}),!!o.items?.length&&(0,r.jsx)(eZ,{title:p("inspectEntityDialog.overviewPage.status.title"),helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses",children:o.items.map((e,t)=>(0,r.jsxs)("div",{children:[(0,r.jsxs)(eK.A,{children:[e.level,": ",e.type]}),(0,r.jsx)(w.A,{ml:2,children:e.message})]},t))})]})]})}var tr=n(64402);function tl(e){let{t}=(0,d.i)(D.j);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:t("inspectEntityDialog.yamlPage.title")}),(0,r.jsx)(eB.A,{children:t("inspectEntityDialog.yamlPage.description")}),(0,r.jsx)(eB.A,{children:(0,r.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,r.jsx)(e3.z,{text:tr.Ay.stringify(e7(e.entity)),language:"yaml",showCopyCodeButton:!0})})})]})}let ts=(0,k.A)(e=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:e.palette.background.paper},tabs:{borderRight:`1px solid ${e.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function to(e){let{children:t,value:n,index:i,...a}=e,l=ts();return(0,r.jsx)("div",{role:"tabpanel",hidden:n!==i,id:`vertical-tabpanel-${i}`,"aria-labelledby":`vertical-tab-${i}`,className:l.tabContents,...a,children:n===i&&(0,r.jsx)(w.A,{pl:3,pr:3,children:t})})}function tc(e){let t=ts(),{t:n}=(0,d.i)(D.j),i=(0,j.useMemo)(()=>({overview:n("inspectEntityDialog.tabNames.overview"),ancestry:n("inspectEntityDialog.tabNames.ancestry"),colocated:n("inspectEntityDialog.tabNames.colocated"),json:n("inspectEntityDialog.tabNames.json"),yaml:n("inspectEntityDialog.tabNames.yaml")}),[n]),a=Object.keys(i),[l,s]=(0,j.useState)(td(a,e.initialTab));return((0,j.useEffect)(()=>{td(a,e.initialTab)},[e.open,e.initialTab,a]),e.entity)?(0,r.jsxs)(_.A,{fullWidth:!0,maxWidth:"xl",open:e.open,onClose:e.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:t.fullHeightDialog},children:[(0,r.jsx)(z.A,{id:"entity-inspector-dialog-title",children:n("inspectEntityDialog.title")}),(0,r.jsx)(F.A,{dividers:!0,children:(0,r.jsxs)("div",{className:t.root,children:[(0,r.jsx)(H.A,{orientation:"vertical",variant:"scrollable",value:l,onChange:(t,n)=>{s(n),e.onSelect?.(a[n])},"aria-label":n("inspectEntityDialog.tabsAriaLabel"),className:t.tabs,children:a.map((e,t)=>(0,r.jsx)(G.A,{label:i[e],...{id:`vertical-tab-${t}`,"aria-controls":`vertical-tabpanel-${t}`}},e))}),(0,r.jsx)(to,{value:l,index:0,children:(0,r.jsx)(ta,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:1,children:(0,r.jsx)(eO,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:2,children:(0,r.jsx)(e5,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:3,children:(0,r.jsx)(e4,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:4,children:(0,r.jsx)(tl,{entity:e.entity})})]})}),(0,r.jsx)(W.A,{children:(0,r.jsx)(U.A,{onClick:e.onClose,color:"primary",children:n("inspectEntityDialog.closeButtonTitle")})})]}):null}function td(e,t){return t?e.indexOf(t):0}var tp=n(80644),tu=n(27231),th=n(96403),tx=n(53320),tg=n(53987);function tm(e){let{entity:t}=e,n=(0,tx.t)(t,th.vv),{t:i}=(0,d.i)(y.W);return(0,r.jsxs)(r.Fragment,{children:[n.length>0&&(0,r.jsx)(tu.S,{label:i("entityLabels.ownerLabel"),contentTypograpyRootComponent:"p",value:(0,r.jsx)(tg.i,{entityRefs:n,defaultKind:"Group",color:"inherit"})}),t.spec?.lifecycle&&(0,r.jsx)(tu.S,{label:i("entityLabels.lifecycleLabel"),value:t.spec.lifecycle?.toString()})]})}var tf=n(37197),ty=n(26314),tj=n(26343),tb=n(28233),tv=n(55197),tA=n(85005),tk=n(71407),tw=n(30152),tE=n(40466),tT=n(92399);let tC=(0,j.forwardRef)((e,t)=>{let{unregisterEntityOptions:n,isUnregisterAllowed:i,onUnregisterEntity:a,onClose:l}=e,{t:s}=(0,d.i)(y.W),o="boolean"==typeof n?.disableUnregister,c=(!i||(o?!!n?.disableUnregister:n?.disableUnregister==="disable"))??!1;return n?.disableUnregister!=="hidden"?(0,r.jsxs)(tj.A,{ref:t,onClick:()=>{l(),a()},disabled:c,...e,children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(tT.default,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:s("entityContextMenu.unregisterMenuTitle")})]}):null});var tS=n(50375),tN=n(11688),tL=n(9135),tB=n(20549);let tR=(0,tL.tK)("entity-context-menu-context"),t$=e=>{let{children:t,onMenuClose:n}=e;return(0,r.jsx)(tR.Provider,{value:(0,tB.B)({1:{onMenuClose:n}}),children:t})},tD=(0,k.A)(e=>({button:{color:e.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function tM(e){let{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,onUnregisterEntity:a,onInspectEntity:l}=e,{t:s}=(0,d.i)(y.W),[o,c]=(0,j.useState)(),p=tD(),u=(0,tw.A)(tE.Nf).allowed,h=()=>{c(void 0)},x=(0,C.gf)(tS.k),[g,m]=(0,tN.A)();(0,j.useEffect)(()=>{!g.error&&g.value&&x.post({message:s("entityContextMenu.copiedMessage"),severity:"info",display:"transient"})},[g,x,s]);let f=t?.length?[...t.map(e=>(0,r.jsxs)(tj.A,{onClick:()=>{h(),e.onClick()},children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(e.Icon,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:e.title})]},e.title)),(0,r.jsx)(tf.A,{},"the divider is here!")]:null,b=[(0,r.jsx)(tC,{unregisterEntityOptions:n,isUnregisterAllowed:u,onUnregisterEntity:a,onClose:h},"unregister-entity"),(0,r.jsxs)(tj.A,{onClick:()=>{h(),l()},children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(tA.default,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:s("entityContextMenu.inspectMenuTitle")})]},"inspect-entity"),(0,r.jsxs)(tj.A,{onClick:()=>{h(),m(window.location.toString())},children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(ty.default,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:s("entityContextMenu.copyURLMenuTitle")})]},"copy-url")];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ew.Ay,{title:s("entityContextMenu.moreButtonTitle"),arrow:!0,children:(0,r.jsx)(eb.A,{"aria-label":s("entityContextMenu.moreButtonAriaLabel"),"aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!o,role:"button",onClick:e=>{c(e.currentTarget)},"data-testid":"menu-button",className:p.button,id:"long-menu",children:(0,r.jsx)(tk.default,{})})}),(0,r.jsx)(tv.Ay,{open:!!o,onClose:h,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu",PaperProps:{style:{minWidth:200}},children:(0,r.jsxs)(tb.A,{autoFocusItem:!!o,children:[f,void 0===i?b:(0,r.jsx)(t$,{onMenuClose:h,children:i})]})})]})}var tP=n(50714);function tO(e,t,n,i){let a,r=e??i?.kind??"",l=t??i?.metadata.namespace??"",s=i?.metadata.title??n??i?.metadata.name??"";return{headerTitle:`${s}${l&&l!==N.oQ?` in ${l}`:""}`,headerType:(a=r.toLocaleLowerCase("en-US"),i&&i.spec&&"type"in i.spec&&(a+=" — ",a+=i.spec.type.toLocaleLowerCase("en-US")),a)}}function tI(e=[],t=[]){for(let n of t){let t=e.find(e=>e.type===n);if(t)return t}return null}let tU=(0,k.A)(e=>({breadcrumbs:{color:e.page.fontColor,fontSize:e.typography.caption.fontSize,textTransform:"uppercase",marginTop:e.spacing(1),opacity:.8,"& span ":{color:e.page.fontColor,textDecoration:"underline",textUnderlineOffset:"3px"}}}));function t_(){let{entity:e}=(0,f.TY)(),{kind:t,namespace:n,name:i}=(0,o.K)(m.s),{headerTitle:a}=tO(t,n,i,e);return(0,r.jsxs)(w.A,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%",children:[(0,r.jsx)(w.A,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e?(0,r.jsx)(L.d,{entityRef:e,hideIcon:!0}):a}),e&&(0,r.jsx)(P,{entity:e})]})}function tW(e){let{parentEntityRelations:t}=e,n=tU(),{entity:i}=(0,f.TY)(),{name:a}=(0,o.K)(m.s),l=tI(i?.relations??[],t??[]),s=(0,C.gf)(O.v),{value:c}=(0,A.A)(async()=>l?tI((await s.getEntityByRef(l?.targetRef))?.relations,t):null,[l,s]);return l?(0,r.jsxs)(E.B,{separator:">",className:n.breadcrumbs,children:[c&&(0,r.jsx)(I.z,{entityRef:c.targetRef,disableTooltip:!0}),(0,r.jsx)(I.z,{entityRef:l.targetRef,disableTooltip:!0}),a]}):null}function tF(e){let{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,parentEntityRelations:a,title:l,subtitle:s}=e,{entity:c}=(0,f.TY)(),{kind:d,namespace:p,name:u}=(0,o.K)(m.s),{headerTitle:h,headerType:x}=tO(d,p,u,c),g=(0,b.useLocation)(),y=(0,b.useNavigate)(),A=(0,S.S)(tP.rQ),k=(0,S.S)(tP.pS),[w,E]=(0,j.useState)(!1),C=(0,j.useCallback)(()=>E(!0),[E]),N=(0,j.useCallback)(()=>E(!1),[E]),L=(0,j.useCallback)(async()=>{E(!1),y(k?k():A())},[y,A,k,E]);(0,j.useEffect)(()=>{E(!1)},[g.pathname]);let[B,R]=(0,v.useSearchParams)(),$=B.get("inspect"),D=(0,j.useCallback)(e=>R(`inspect=${e}`),[R]),M=(0,j.useCallback)(()=>R("inspect"),[R]),P=(0,j.useCallback)(()=>R(),[R]);return(0,r.jsx)(T.Y,{pageTitleOverride:h,type:x,title:l??(0,r.jsx)(t_,{}),subtitle:s??(0,r.jsx)(tW,{parentEntityRelations:a}),children:c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(tm,{entity:c}),(0,r.jsx)(tM,{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,onInspectEntity:M,onUnregisterEntity:C}),(0,r.jsx)(tc,{entity:c,initialTab:$||void 0,open:"string"==typeof $,onClose:P,onSelect:D}),(0,r.jsx)(tp.I,{entity:c,open:w,onClose:N,onConfirm:L})]})})}var tz=n(93285),tG=n(21613);let tH=(0,k.A)(e=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:e.spacing(3),paddingBottom:e.spacing(3),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"EntityTabsPanel"});function tK(e){let{className:t,stretch:n,noPadding:i,children:a,...l}=e,s=tH();return(0,r.jsx)("article",{...l,className:X()(s.root,t,{[s.stretch]:n,[s.noPadding]:i}),children:a})}var tY=n(11192),tQ=n(99703),tX=n(7031),tV=n(6924),tZ=n(80615);function tq(e,t,n){if(n){if("string"==typeof e){let n=t.getIcon(e);return n?(0,r.jsx)(n,{}):void 0}return e}}let tJ=(0,j.forwardRef)(function(e,t){let[n,i]=(0,j.useState)(null),a=(0,C.gf)(tZ.s),l=!!n,{classes:s,className:o,disabled:c=!1,disableFocusRipple:d=!1,items:p,fullWidth:u,indicator:h,label:x,onSelectTab:g,selected:m,textColor:f="inherit",wrapped:y=!1,highlightedButton:b,showIcons:A=!1}=e,k=tq(e.icon,a,A),w="data-testid"in e&&e["data-testid"],E=()=>{i(null)},T=[s?.root,s?.[`textColor${(0,tY.A)(f)}`],s&&{[s.disabled]:c,[s.selected]:m,[s.labelIcon]:x&&k,[s.fullWidth]:u,[s.wrapped]:y},o];if(1===p.length)return(0,r.jsxs)(U.A,{focusRipple:!d,"data-testid":w,className:X()(T,s&&{[s.labelIcon]:x&&(p[0].icon??k)}),ref:t,role:"tab","aria-selected":m,disabled:c,component:v.Link,onClick:g,to:p[0]?.path,startIcon:tq(p[0].icon,a,A),children:[(0,r.jsx)(eK.A,{className:s?.wrapper,variant:"button",children:p[0].label}),h]});let S=A&&p.some(e=>e.icon);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(U.A,{"data-testid":w,focusRipple:!d,className:X()(T),ref:t,role:"tab","aria-selected":m,disabled:c,onClick:e=>{i(e.currentTarget)},startIcon:k,children:[(0,r.jsx)(eK.A,{className:s?.wrapper,variant:"button",children:x}),(0,r.jsx)(tV.default,{})]}),(0,r.jsx)(tv.Ay,{id:l?"tabbed-submenu":void 0,open:l,anchorEl:n,onClose:E,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,r.jsx)(eU.A,{component:"nav",children:p.map(e=>{let n=tq(e.icon,a,A);return(0,r.jsxs)(e_.A,{button:!0,focusRipple:!d,classes:{selected:X()(s?.selectedButton),default:X()(s?.unselectedButton),disabled:X()(s?.disabled)},ref:t,"aria-selected":m,disabled:c,selected:b===e.id,component:v.Link,onClick:e=>{E(),g?.(e)},to:e.path,children:[n&&(0,r.jsx)(ez.A,{children:n}),(0,r.jsx)(eG.A,{inset:!n&&S,primary:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eK.A,{variant:"button",children:e.label}),h]})})]},`popover_item_${e.id}`)})})})]})}),t0=(0,tX.A)(e=>(0,tQ.A)({root:{...e.typography.button,maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px",[e.breakpoints.up("sm")]:{padding:"6px 24px"},overflow:"hidden",whiteSpace:"normal",textAlign:"center",[e.breakpoints.up("sm")]:{minWidth:160}},defaultTab:{...e.typography.caption,padding:e.spacing(3,3),textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,color:e.palette.text.secondary},labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},selectedButton:{color:`${e.palette.text.primary}`,opacity:"1"},unselectedButton:{color:`${e.palette.text.secondary}`,opacity:"0.7"},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"row"}}),{name:"MuiTab"})(tJ),t1=(0,k.A)(e=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:e.palette.background.paper,paddingLeft:e.spacing(3),minWidth:0},defaultTab:{...e.typography.caption,padding:e.spacing(3,3),textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,color:e.palette.text.secondary},selected:{color:e.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:e.palette.background.default,color:e.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function t2(e){let t=t1(),{t:n}=(0,d.i)(y.W),{tabs:i,selectedIndex:a=0,showIcons:l,groupDefinitions:s}=e,o=(0,j.useMemo)(()=>i.reduce((e,t)=>{let n=t.group?s[t.group]:void 0,i=n&&t.group?t.group:t.id;return e[i]=e[i]??{group:n,items:[]},e[i].items.push(t),e},{}),[i,s]),c=i[a];return(0,r.jsx)(w.A,{className:t.tabsWrapper,children:(0,r.jsx)(H.A,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":n("entityTabs.tabsAriaLabel"),value:c?.group??c?.id,children:Object.entries(o).map(([e,n])=>(0,r.jsx)(t0,{"data-testid":`header-tab-${e}`,className:t.defaultTab,classes:{selected:t.selected,root:t.tabRoot},label:n.group?.title,icon:n.group?.icon,value:e,items:n.items,highlightedButton:c?.id,showIcons:l},e))})})}function t5(e){let{routes:t,groupDefinitions:n,showIcons:i}=e,{index:a,route:l,element:s}=function(e){let t=(0,b.useParams)(),n=e.map(({path:e,children:t})=>({caseSensitive:!1,path:`${e}/*`,element:t})).sort((e,t)=>t.path.replace(/\/\*$/,"").localeCompare(e.path.replace(/\/\*$/,""))),i=(0,b.useRoutes)(n)??e[0]?.children,a=t["*"]??"";a.startsWith("/")||(a=`/${a}`);let[r]=(0,tG.ue)(n,a)??[],l=r?e.findIndex(e=>`${e.path}/*`===r.route.path):0;return{index:-1===l?0:l,element:i,route:e[l]??e[0]}}(t),o=(0,j.useMemo)(()=>t.map(e=>{let{path:t,title:n,group:i,icon:a}=e,r=t;return{group:i,id:t,path:r=(r=r.replace(/\/\*$/,"")).replace(/^\//,""),label:n,icon:a}}),[t]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t2,{tabs:o,selectedIndex:a,showIcons:i,groupDefinitions:n}),(0,r.jsxs)(tK,{children:[(0,r.jsx)(tz.m,{title:l?.title}),s]})]})}let t3="plugin.catalog.entityLayoutRoute",t7=()=>null;(0,s.h)(t7,t3,!0),(0,s.h)(t7,"core.gatherMountPoints",!0);let t4=e=>{let{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,children:a,header:s,NotFoundComponent:j,parentEntityRelations:b,groupDefinitions:v,showNavItemIcons:A}=e,{kind:k}=(0,o.K)(m.s),{entity:w,loading:E,error:T}=(0,f.TY)(),C=(0,c.O)(a,e=>e.selectByComponentData({key:t3,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:e})=>w&&(!e.if||e.if(w))?[{path:e.path,title:e.title,group:e.group,children:e.children,icon:e.icon}]:[]),[w]),{t:S}=(0,d.i)(y.W);return(0,r.jsxs)(p.Y,{themeId:w?.spec?.type?.toString()??"home",children:[s??(0,r.jsx)(tF,{parentEntityRelations:b,UNSTABLE_contextMenuOptions:n,UNSTABLE_extraContextMenuItems:t,contextMenuItems:i}),E&&(0,r.jsx)(u.k,{}),w&&(0,r.jsx)(t5,{routes:C,groupDefinitions:v,showIcons:A}),T&&(0,r.jsx)(h.U,{children:(0,r.jsx)(l.A,{severity:"error",children:T.toString()})}),!E&&!T&&!w&&(0,r.jsx)(h.U,{children:j||(0,r.jsx)(x.B,{title:S("entityLabels.warningPanelTitle"),children:S("entityPage.notFoundMessage",{kind:k,link:(0,r.jsx)(g.N_,{to:"https://backstage.io/docs/features/software-catalog/references",children:S("entityPage.notFoundLinkText")})})})})]})};t4.Route=t7}}]);
|
|
2
|
-
//# sourceMappingURL=4445.
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["4445"],{280(e,t,n){n.d(t,{m:()=>d,v:()=>u});var i=n(31085),a=n(29365),r=n(71677),l=n(72501),s=n(58837),o=n(55940);let c=(0,s.A)(()=>({icon:{color:"#f3ba37",cursor:"pointer",display:"inline-flex"},iconBorder:{color:"inherit",cursor:"pointer",display:"inline-flex"}}),{name:"BackstageFavoriteToggleIcon"});function d(e){let{isFavorite:t}=e,n=c();return(0,i.jsx)(l.A,{component:"span",className:t?n.icon:n.iconBorder,children:t?(0,i.jsx)(o.Gg,{}):(0,i.jsx)(o.KG,{})})}function u(e){let{id:t,title:n,isFavorite:l,onToggle:s,...o}=e;return(0,i.jsx)(r.Ay,{id:t,title:n,children:(0,i.jsx)(a.A,{"aria-label":n,id:t,onClick:()=>s(!l),color:"inherit",...o,children:(0,i.jsx)(d,{isFavorite:l})})})}},7537(e,t,n){n.d(t,{S:()=>l,Z:()=>s});var i=n(11773),a=n(46123),r=n.n(a);function l(e,t){let n,a,r,l=t?.defaultKind;return"metadata"in e?(n=e.kind,a=e.metadata.namespace,r=e.metadata.name):(n=e.kind,a=e.namespace,r=e.name),(void 0===a||""===a)&&(a=i.oQ),t?.defaultNamespace!==void 0?t?.defaultNamespace===a&&(a=void 0):a===i.oQ&&(a=void 0),n=n.toLocaleLowerCase("en-US"),n=l&&l.toLocaleLowerCase("en-US")===n?void 0:n,`${n?`${n}:`:""}${a?`${a}/`:""}${r}`}function s(e,t){for(let t of["spec.profile.displayName","metadata.title"]){let n=r()(e,t);if(n&&"string"==typeof n)return n}return t}},48764(e,t,n){n.d(t,{EntityLayout:()=>t6});var i,a,r=n(31085),l=n(48209),s=n(65605),o=n(90615),c=n(62335),d=n(89595),u=n(12439),p=n(55489),h=n(84391),x=n(87187),g=n(60603),m=n(15448),f=n(22845),y=n(50010),j=n(14041),b=n(18690),v=n(73657),A=n(73466),k=n(58837),w=n(77125),E=n(4103),T=n(70111),C=n(50509),S=n(81219),N=n(11773),L=n(26958),B=n(58077),R=n(769);function $(e){return"string"==typeof e?e:(0,B.U2)(e)}var D=n(79811),M=n(280);let P=e=>{let{toggleStarredEntity:t,isStarredEntity:n}=function(e){let t=(0,C.gf)(R.a),[n,i]=(0,j.useState)(!1);return(0,j.useEffect)(()=>{let n=t.starredEntitie$().subscribe({next(t){i(t.has($(e)))}});return()=>{n.unsubscribe()}},[e,t]),{toggleStarredEntity:(0,j.useCallback)(()=>t.toggleStarred($(e)).then(),[e,t]),isStarredEntity:n}}(e.entity),{t:i}=(0,d.i)(D.j),a=i(n?"favoriteEntity.removeFromFavorites":"favoriteEntity.addToFavorites"),l=`favorite-${(0,B.U2)(e.entity).replace(/[^a-zA-Z0-9-_]/g,"-")}`;return(0,r.jsx)(M.v,{title:a,id:l,isFavorite:n,onToggle:t,...e})};var O=n(76272),I=n(3438),U=n(64947),_=n(76891),W=n(93453),F=n(46805),z=n(61477),G=n(38605),H=n(74953),K=n(97673),Y=n(37238),Q=n(53373),X=n.n(Q),V=n(45250),Z=n(68510),q=n(67566),J=n(41809),ee=n(57586),et=n.n(ee),en=n(12784),ei=n.n(en);(i=a||(a={})).Direction={TOP_BOTTOM:"TB",BOTTOM_TOP:"BT",LEFT_RIGHT:"LR",RIGHT_LEFT:"RL"},i.Alignment={UP_LEFT:"UL",UP_RIGHT:"UR",DOWN_LEFT:"DL",DOWN_RIGHT:"DR"},i.Ranker={NETWORK_SIMPLEX:"network-simplex",TIGHT_TREE:"tight-tree",LONGEST_PATH:"longest-path"},i.LabelPosition={LEFT:"l",RIGHT:"r",CENTER:"c"};var ea=n(22249);let er=(0,k.A)(e=>({node:{fill:e.palette.primary.light,stroke:e.palette.primary.light},text:{fill:e.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function el({node:{id:e}}){let t=er(),[n,i]=(0,j.useState)(0),[a,l]=(0,j.useState)(0),s=(0,j.useRef)(null);(0,j.useLayoutEffect)(()=>{if(s.current){let{height:e,width:t}=s.current.getBBox();e=Math.round(e),t=Math.round(t),(e!==a||t!==n)&&(i(t),l(e))}},[n,a]);let o=n+20,c=a+20;return(0,r.jsxs)("g",{children:[(0,r.jsx)("rect",{className:t.node,width:o,height:c,rx:10}),(0,r.jsx)("text",{ref:s,className:t.text,y:c/2,x:o/2,textAnchor:"middle",alignmentBaseline:"middle",children:e})]})}let es=(0,ea.default)(e=>({node:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),eo=e=>(0,r.jsx)(el,{...e});function ec({render:e=eo,setNode:t,node:n}){let{width:i,height:a,x:l=0,y:s=0}=n,o=es(),c=(0,j.useRef)(null);return(0,j.useLayoutEffect)(()=>{if(c.current){let{height:e,width:r}=c.current.getBBox();e=Math.round(e),r=Math.round(r),(e!==a||r!==i)&&t(n.id,{...n,height:e,width:r})}},[n,i,a,t]),(0,r.jsx)("g",{ref:c,"data-testid":"node",className:o.node,transform:`translate(${l-i/2},${s-a/2})`,children:e({node:n})})}var ed=n(1121),eu=n(12895),ep=n(20644),eh=n.n(ep);let ex="arrow-marker",eg=(0,ea.default)(e=>({text:{fill:e.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function em({edge:{label:e}}){let t=eg();return(0,r.jsx)("text",{className:t.text,textAnchor:"middle",children:e})}let ef=(0,ea.default)(e=>({path:{strokeWidth:1.3,stroke:e.palette.textSubtle,fill:"none",transition:`${e.transitions.duration.shortest}ms`},label:{transition:`${e.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),ey=e=>(0,r.jsx)(em,{...e});function ej({render:e=ey,setEdge:t,id:n,edge:i,curve:a,showArrowHeads:l}){let{x:s=0,y:o=0,width:c,height:d,points:u}=i,p=ef(),h=(0,j.useRef)(null);(0,j.useLayoutEffect)(()=>{if(h.current){let{height:e,width:a}=h.current.getBBox();e=Math.round(e),a=Math.round(a),(e!==d||a!==c)&&t(n,{...i,height:e,width:a})}},[i,d,c,t,n]);let x="",g=(0,j.useMemo)(()=>ed.A().x(e=>e.x).y(e=>e.y).curve(eu[a]),[a]);return u&&(x=g(u.filter(e=>eh()(e.x)&&eh()(e.y)))||""),(0,r.jsxs)(r.Fragment,{children:[x&&(0,r.jsx)("path",{"data-testid":"edge",className:p.path,markerEnd:l?`url(#${ex})`:void 0,d:x}),i.label?(0,r.jsx)("g",{ref:h,"data-testid":"label",className:p.label,transform:`translate(${s},${o})`,children:e({edge:i})}):null]})}var eb=n(29365),ev=n(25828),eA=n(63988),ek=n(14112),ew=n(71677),eE=n(89332);let eT=(0,k.A)(e=>({fullscreenButton:{position:"absolute",right:0},root:{overflow:"hidden",minHeight:"100%",minWidth:"100%"},fixedHeight:{maxHeight:"100%"},fullscreen:{backgroundColor:e.palette.background.paper}})),eC="workspace",eS="dependency-graph";function eN(e){let{edges:t,nodes:n,renderNode:i,direction:l=a.Direction.TOP_BOTTOM,align:s,nodeMargin:o=50,edgeMargin:c=10,rankMargin:u=50,paddingX:p=0,paddingY:h=0,acyclicer:x,ranker:g=a.Ranker.NETWORK_SIMPLEX,labelPosition:m=a.LabelPosition.RIGHT,labelOffset:f=10,edgeRanks:y=1,edgeWeight:b=1,renderEdge:v,renderLabel:A,defs:k,zoom:w="enabled",curve:E="curveMonotoneX",showArrowHeads:T=!1,fit:C="grow",allowFullscreen:S=!0,...N}=e,L=(0,J.default)(),[B,R]=(0,j.useState)(100),[$,D]=(0,j.useState)(100),M=(0,ek.V)(),P=eT(),{t:O}=(0,d.i)(eE.O),I=(0,j.useRef)(new(et()).graphlib.Graph),[U,_]=(0,j.useState)(I.current.graph()?.width||0),[W,F]=(0,j.useState)(I.current.graph()?.height||0),[z,G]=(0,j.useState)([]),[H,K]=(0,j.useState)([]),Q=Math.max(U,B),ee=Math.max(W,$),[en]=(0,Y.A)(),ea=(0,V.once)(en),er="grow"!==C||M.active?"100%":ee,el=(0,j.useMemo)(()=>ei()(e=>{if(!e)return;ea(e);let t=e.querySelector(`svg#${eS}`);if(!t)return;let n=q.A(t),i=q.A(t.getElementById(eC));function a(){n.call(Z.s_().scaleExtent([1,1/0]).on("zoom",e=>{e.transform.x=Math.min(0,Math.max(e.transform.x,Q-Q*e.transform.k)),e.transform.y=Math.min(0,Math.max(e.transform.y,ee-ee*e.transform.k)),i.attr("transform",e.transform)}))}"enabled"===w?a():"enable-on-click"===w&&n.on("click",()=>a());let{width:r,height:l}=e.getBoundingClientRect();B!==r&&r<=Q&&R(r),$!==l&&l<=ee&&D(l)},100),[ea,$,B,Q,ee,w]),es=(0,j.useCallback)(()=>{let e=I.current.nodes(),i=I.current.edges();e.forEach(e=>{n.some(t=>t.id===e)||I.current.removeNode(e)}),i.forEach(e=>{t.some(t=>t.from===e.v&&t.to===e.w)||I.current.removeEdge(e.v,e.w)}),n.forEach(e=>{let t=I.current.nodes().find(t=>e.id===t);if(t&&I.current.node(t)){let{width:n,height:i,x:a,y:r}=I.current.node(t);I.current.setNode(t,{...e,width:n,height:i,x:a,y:r})}else I.current.setNode(e.id,{...e,width:0,height:0})}),t.forEach(e=>{I.current.setEdge(e.from,e.to,{...e,label:e.label,width:0,height:0,labelpos:m,labeloffset:f,weight:b,minlen:y})})},[t,n,m,f,b,y]),eo=(0,j.useMemo)(()=>ei()(()=>{et().layout(I.current);let{height:e,width:t}=I.current.graph(),n=Math.max(0,e||0);_(Math.max(0,t||0)),F(n),G(I.current.nodes()),K(I.current.edges())},250,{leading:!0}),[]);(0,j.useEffect)(()=>(I.current.setGraph({rankdir:l,align:s,nodesep:o,edgesep:c,ranksep:u,marginx:p,marginy:h,acyclicer:x,ranker:g}),es(),eo(),eo.cancel),[x,s,l,c,p,h,o,u,g,es,eo]);let ed=(0,j.useCallback)((e,t)=>(I.current.setNode(e,t),eo(),I.current),[eo]),eu=(0,j.useCallback)((e,t)=>(I.current.setEdge(e,t),eo(),I.current),[eo]);return(0,r.jsxs)(ek.m,{handle:M,className:X()(M.active?P.fullscreen:P.root),children:[S&&(0,r.jsx)(ew.Ay,{title:O("dependencyGraph.fullscreenTooltip"),children:(0,r.jsx)(eb.A,{className:P.fullscreenButton,onClick:M.active?M.exit:M.enter,children:M.active?(0,r.jsx)(eA.default,{}):(0,r.jsx)(ev.default,{})})}),(0,r.jsx)("div",{ref:el,style:{width:"100%",height:"100%"},children:(0,r.jsxs)("svg",{...N,width:"100%",height:er,viewBox:`0 0 ${Q} ${ee}`,id:eS,children:[(0,r.jsxs)("defs",{children:[(0,r.jsx)("marker",{id:ex,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth",children:(0,r.jsx)("path",{fill:L.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),k]}),(0,r.jsx)("g",{id:eC,children:(0,r.jsxs)("svg",{width:U,height:W,y:ee/2-W/2,x:Q/2-U/2,viewBox:`0 0 ${U} ${W}`,children:[H.map(e=>{let t=I.current.edge(e);return t?v?v({edge:t,id:e}):(0,r.jsx)(ej,{id:e,setEdge:eu,render:A,edge:t,curve:E,showArrowHeads:T},`${e.v}-${e.w}`):null}),z.map(e=>{let t=I.current.node(e);return t?(0,r.jsx)(ec,{setNode:ed,render:i,node:t},e):null})]})})]})})]})}var eL=n(91189),eB=n(59461),eR=n(7537);let e$=n(10437).A;function eD(e){let t,n,{kind:i,entityRef:a,...l}=e,s=(t=(0,eL.n)(),(n=function(e,t){if(e)return e.toLocaleLowerCase("en-US");if(t)try{return(0,B.KU)(t).kind.toLocaleLowerCase("en-US")}catch{}}(i,a))&&t.getSystemIcon(`kind:${n}`)||e$);return(0,r.jsx)(s,{...l})}let eM=(0,k.A)(e=>({node:{fill:e.palette.grey[300],stroke:e.palette.grey[300],"&.primary":{fill:e.palette.primary.light,stroke:e.palette.primary.light},"&.secondary":{fill:e.palette.secondary.light,stroke:e.palette.secondary.light}},text:{fill:e.palette.getContrastText(e.palette.grey[300]),"&.primary":{fill:e.palette.primary.contrastText},"&.secondary":{fill:e.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function eP({node:e}){let t=eM(),n=(0,b.useNavigate)(),i=(0,S.S)(m.s),[a,l]=(0,j.useState)(0),[s,o]=(0,j.useState)(0),c=(0,eL.n)(),d=(0,j.useRef)(null);(0,j.useLayoutEffect)(()=>{if(d.current){let{height:e,width:t}=d.current.getBBox();e=Math.round(e),t=Math.round(t),(e!==s||t!==a)&&(l(t),o(e))}},[a,s]);let u=c.getSystemIcon(`kind:${e.kind.toLocaleLowerCase("en-US")}`),p=u?s+10:0,h=s+20,x=e.metadata.title||(e.kind&&e.metadata.name&&e.metadata.namespace?(0,eR.S)({kind:e.kind,name:e.metadata.name,namespace:e.metadata.namespace||""}):e.id);return(0,r.jsxs)("g",{onClick:()=>{n(i({kind:e.kind,namespace:e.metadata.namespace||N.oQ,name:e.metadata.name}))},className:t.clickable,children:[(0,r.jsx)("rect",{className:X()(t.node,e.root?"secondary":"primary"),width:p+a+20,height:h,rx:10}),u&&(0,r.jsx)(eD,{kind:e.kind,y:10,x:10,width:s,height:s,className:X()(t.text,e.root?"secondary":"primary")}),(0,r.jsx)("text",{ref:d,className:X()(t.text,e.root?"secondary":"primary"),y:h/2,x:p+(a+20)/2,textAnchor:"middle",alignmentBaseline:"middle",children:x})]})}function eO(e){let{loading:t,error:n,nodes:i,edges:l}=function(e){let t=(0,C.gf)(O.v),n=(0,B.U2)(e),{loading:i,error:a,value:r}=(0,A.A)(async()=>{let e=await t.getEntityAncestors({entityRef:n}),i=[],a=[];for(let t of e.items){let n=(0,B.U2)(t.entity),r=n===e.rootEntityRef;for(let e of(i.push({id:n,root:r,...t.entity}),t.parentEntityRefs))a.push({from:n,to:e})}return{nodes:i,edges:a}},[n]);return{loading:i,error:a,nodes:r?.nodes||[],edges:r?.edges||[]}}(e.entity),{t:s}=(0,d.i)(D.j);return t?(0,r.jsx)(p.k,{}):n?(0,r.jsx)(K._,{error:n}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:s("inspectEntityDialog.ancestryPage.title")}),(0,r.jsx)(eB.A,{gutterBottom:!0,children:s("inspectEntityDialog.ancestryPage.description",{processorsLink:(0,r.jsx)(g.N_,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity",children:s("inspectEntityDialog.ancestryPage.processorsLink")})})}),(0,r.jsx)(w.A,{mt:4,children:(0,r.jsx)(eN,{nodes:i,edges:l,renderNode:eP,direction:a.Direction.BOTTOM_TOP,zoom:"enable-on-click"})})]})}var eI=n(16263),eU=n(58007),e_=n(8109),eW=n(40703),eF=n(48653),ez=n(46423),eG=n(5951),eH=n(62261),eK=n(72501),eY=n(97262);let eQ=(0,k.A)(e=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:e.spacing(2)},helpIcon:{marginLeft:e.spacing(1),color:e.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function eX(e){let t=eQ();return(0,r.jsx)(eG.A,{...e,primaryTypographyProps:{className:t.monospace},secondaryTypographyProps:{className:t.monospace}})}function eV(e){let t=eQ();return(0,r.jsx)(eH.A,{className:t.monospace,children:e.children})}function eZ(e){return(0,r.jsx)(w.A,{mt:2,children:(0,r.jsx)(eW.A,{variant:"outlined",children:(0,r.jsxs)(eF.A,{children:[(0,r.jsxs)(eK.A,{variant:"h6",gutterBottom:!0,children:[e.title,e.helpLink&&(0,r.jsx)(eJ,{to:e.helpLink})]}),e.children]})})})}function eq(e){let[t,n]=e.entry,i=n.match(/^url:https?:\/\//)?n.slice(4):n.match(/^https?:\/\//)?n:void 0;return(0,r.jsxs)(e_.A,{children:[e.indent&&(0,r.jsx)(ez.A,{}),(0,r.jsx)(eX,{primary:t,secondary:i?(0,r.jsx)(g.N_,{to:i,children:n}):n})]})}function eJ(e){let t=eQ();return(0,r.jsx)(g.N_,{to:e.to,className:t.helpIcon,children:(0,r.jsx)(eY.default,{fontSize:"inherit"})})}let e0=(0,k.A)({root:{display:"flex",flexDirection:"column"}});function e1(e){return(0,r.jsxs)(eU.A,{dense:!0,children:[e.header&&(0,r.jsx)(eq,{entry:e.header},"header"),e.entities.map(e=>(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:(0,r.jsx)(I.z,{entityRef:e})})},(0,B.U2)(e)))]})}function e2(e){let{entity:t}=e,{t:n}=(0,d.i)(D.j),{loading:i,error:a,location:s,originLocation:o,colocatedEntities:c}=function(e){let t=(0,C.gf)(O.v),n=(0,B.U2)(e),i=e.metadata.annotations?.[eI.Eo],a=e.metadata.annotations?.[eI.r2],{loading:r,error:l,value:s}=(0,A.A)(async()=>i||a?(await t.getEntities({filter:[...i?[{[`metadata.annotations.${eI.Eo}`]:i}]:[],...a?[{[`metadata.annotations.${eI.r2}`]:a}]:[]]})).items:[],[i,a]);return{loading:r,error:l,location:i,originLocation:a,colocatedEntities:s?.filter(e=>(0,B.U2)(e)!==n)}}(t);if(i)return(0,r.jsx)(p.k,{});if(a)return(0,r.jsx)(K._,{error:a});if(!s&&!o)return(0,r.jsx)(l.A,{severity:"warning",children:n("inspectEntityDialog.colocatedPage.alertNoLocation")});if(!c?.length)return(0,r.jsx)(l.A,{severity:"info",children:n("inspectEntityDialog.colocatedPage.alertNoEntity")});if(s===o)return(0,r.jsx)(e1,{entities:c});let u=c.filter(e=>e.metadata.annotations?.[eI.Eo]===s),h=c.filter(e=>e.metadata.annotations?.[eI.r2]===o);return(0,r.jsxs)(r.Fragment,{children:[u.length>0&&(0,r.jsx)(e1,{entities:u,header:[n("inspectEntityDialog.colocatedPage.locationHeader"),s]}),h.length>0&&(0,r.jsx)(e1,{entities:h,header:[n("inspectEntityDialog.colocatedPage.originHeader"),o]})]})}function e5(e){let t=e0(),{t:n}=(0,d.i)(D.j);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:n("inspectEntityDialog.colocatedPage.title")}),(0,r.jsx)(eB.A,{children:n("inspectEntityDialog.colocatedPage.description")}),(0,r.jsx)("div",{className:t.root,children:(0,r.jsx)(e2,{entity:e.entity})})]})}var e3=n(4809);function e7(e){return Object.fromEntries([...Object.entries(e)].sort((e,t)=>e[0]<t[0]?-1:1))}function e4(e){let{t}=(0,d.i)(D.j);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:t("inspectEntityDialog.jsonPage.title")}),(0,r.jsx)(eB.A,{children:t("inspectEntityDialog.jsonPage.description")}),(0,r.jsx)(eB.A,{children:(0,r.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,r.jsx)(e3.z,{text:JSON.stringify(e7(e.entity),void 0,2),language:"json",showCopyCodeButton:!0})})})]})}var e6=n(65569),e8=n(87809),e9=n.n(e8),te=n(40074),tt=n.n(te),tn=n(55555);let ti=(0,k.A)({root:{display:"flex",flexDirection:"column"}});function ta(e){let t=ti(),{apiVersion:n,kind:i,metadata:a,spec:l,relations:s=[],status:o={}}=e.entity,c=e9()(tt()(s,e=>e.targetRef),"type"),{t:u}=(0,d.i)(D.j),p=(0,B.U2)(e.entity);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:u("inspectEntityDialog.overviewPage.title")}),(0,r.jsxs)("div",{className:t.root,children:[(0,r.jsx)(eZ,{title:u("inspectEntityDialog.overviewPage.identity.title"),children:(0,r.jsxs)(eU.A,{dense:!0,children:[(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:"apiVersion",secondary:n})}),(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:"kind",secondary:i})}),l?.type&&(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:"spec.type",secondary:l.type?.toString()})}),a.uid&&(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(eX,{primary:"uid",secondary:a.uid}),(0,r.jsx)(e6.A,{children:(0,r.jsx)(tn.l,{text:a.uid})})]}),a.etag&&(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(eX,{primary:"etag",secondary:a.etag}),(0,r.jsx)(e6.A,{children:(0,r.jsx)(tn.l,{text:a.etag})})]}),(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(eX,{primary:"entityRef",secondary:p}),(0,r.jsx)(e6.A,{children:(0,r.jsx)(tn.l,{text:p})})]})]})}),(0,r.jsxs)(eZ,{title:u("inspectEntityDialog.overviewPage.metadata.title"),children:[!!Object.keys(a.annotations||{}).length&&(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsxs)(eV,{children:[u("inspectEntityDialog.overviewPage.annotations"),(0,r.jsx)(eJ,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"})]}),children:Object.entries(a.annotations).map(e=>(0,r.jsx)(eq,{indent:!0,entry:e},e[0]))}),!!Object.keys(a.labels||{}).length&&(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsx)(eV,{children:u("inspectEntityDialog.overviewPage.labels")}),children:Object.entries(a.labels).map(e=>(0,r.jsx)(eq,{indent:!0,entry:e},e[0]))}),!!a.tags?.length&&(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsx)(eV,{children:u("inspectEntityDialog.overviewPage.tags")}),children:a.tags.map((e,t)=>(0,r.jsxs)(e_.A,{children:[(0,r.jsx)(ez.A,{}),(0,r.jsx)(eX,{primary:e})]},`${e}-${t}`))})]}),!!s.length&&(0,r.jsx)(eZ,{title:u("inspectEntityDialog.overviewPage.relation.title"),helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations",children:Object.entries(c).map(([e,t],n)=>(0,r.jsx)("div",{children:(0,r.jsx)(eU.A,{dense:!0,subheader:(0,r.jsx)(eV,{children:e}),children:t.map(e=>(0,r.jsx)(e_.A,{children:(0,r.jsx)(eX,{primary:(0,r.jsx)(I.z,{entityRef:e.targetRef})})},e.targetRef))})},n))}),!!o.items?.length&&(0,r.jsx)(eZ,{title:u("inspectEntityDialog.overviewPage.status.title"),helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses",children:o.items.map((e,t)=>(0,r.jsxs)("div",{children:[(0,r.jsxs)(eK.A,{children:[e.level,": ",e.type]}),(0,r.jsx)(w.A,{ml:2,children:e.message})]},t))})]})]})}var tr=n(64402);function tl(e){let{t}=(0,d.i)(D.j);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eB.A,{variant:"h2",children:t("inspectEntityDialog.yamlPage.title")}),(0,r.jsx)(eB.A,{children:t("inspectEntityDialog.yamlPage.description")}),(0,r.jsx)(eB.A,{children:(0,r.jsx)("div",{style:{fontSize:"75%"},"data-testid":"code-snippet",children:(0,r.jsx)(e3.z,{text:tr.Ay.stringify(e7(e.entity)),language:"yaml",showCopyCodeButton:!0})})})]})}let ts=(0,k.A)(e=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:e.palette.background.paper},tabs:{borderRight:`1px solid ${e.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function to(e){let{children:t,value:n,index:i,...a}=e,l=ts();return(0,r.jsx)("div",{role:"tabpanel",hidden:n!==i,id:`vertical-tabpanel-${i}`,"aria-labelledby":`vertical-tab-${i}`,className:l.tabContents,...a,children:n===i&&(0,r.jsx)(w.A,{pl:3,pr:3,children:t})})}function tc(e){let t=ts(),{t:n}=(0,d.i)(D.j),i=(0,j.useMemo)(()=>({overview:n("inspectEntityDialog.tabNames.overview"),ancestry:n("inspectEntityDialog.tabNames.ancestry"),colocated:n("inspectEntityDialog.tabNames.colocated"),json:n("inspectEntityDialog.tabNames.json"),yaml:n("inspectEntityDialog.tabNames.yaml")}),[n]),a=Object.keys(i),[l,s]=(0,j.useState)(td(a,e.initialTab));return((0,j.useEffect)(()=>{td(a,e.initialTab)},[e.open,e.initialTab,a]),e.entity)?(0,r.jsxs)(_.A,{fullWidth:!0,maxWidth:"xl",open:e.open,onClose:e.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:t.fullHeightDialog},children:[(0,r.jsx)(z.A,{id:"entity-inspector-dialog-title",children:n("inspectEntityDialog.title")}),(0,r.jsx)(F.A,{dividers:!0,children:(0,r.jsxs)("div",{className:t.root,children:[(0,r.jsx)(H.A,{orientation:"vertical",variant:"scrollable",value:l,onChange:(t,n)=>{s(n),e.onSelect?.(a[n])},"aria-label":n("inspectEntityDialog.tabsAriaLabel"),className:t.tabs,children:a.map((e,t)=>(0,r.jsx)(G.A,{label:i[e],...{id:`vertical-tab-${t}`,"aria-controls":`vertical-tabpanel-${t}`}},e))}),(0,r.jsx)(to,{value:l,index:0,children:(0,r.jsx)(ta,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:1,children:(0,r.jsx)(eO,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:2,children:(0,r.jsx)(e5,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:3,children:(0,r.jsx)(e4,{entity:e.entity})}),(0,r.jsx)(to,{value:l,index:4,children:(0,r.jsx)(tl,{entity:e.entity})})]})}),(0,r.jsx)(W.A,{children:(0,r.jsx)(U.A,{onClick:e.onClose,color:"primary",children:n("inspectEntityDialog.closeButtonTitle")})})]}):null}function td(e,t){return t?e.indexOf(t):0}var tu=n(80644),tp=n(27231),th=n(96403),tx=n(53320),tg=n(53987);function tm(e){let{entity:t}=e,n=(0,tx.t)(t,th.vv),{t:i}=(0,d.i)(y.W);return(0,r.jsxs)(r.Fragment,{children:[n.length>0&&(0,r.jsx)(tp.S,{label:i("entityLabels.ownerLabel"),contentTypograpyRootComponent:"p",value:(0,r.jsx)(tg.i,{entityRefs:n,defaultKind:"Group",color:"inherit"})}),t.spec?.lifecycle&&(0,r.jsx)(tp.S,{label:i("entityLabels.lifecycleLabel"),value:t.spec.lifecycle?.toString()})]})}var tf=n(37197),ty=n(26314),tj=n(26343),tb=n(28233),tv=n(55197),tA=n(85005),tk=n(71407),tw=n(30152),tE=n(40466),tT=n(92399);let tC=(0,j.forwardRef)((e,t)=>{let{unregisterEntityOptions:n,isUnregisterAllowed:i,onUnregisterEntity:a,onClose:l}=e,{t:s}=(0,d.i)(y.W),o="boolean"==typeof n?.disableUnregister,c=(!i||(o?!!n?.disableUnregister:n?.disableUnregister==="disable"))??!1;return n?.disableUnregister!=="hidden"?(0,r.jsxs)(tj.A,{ref:t,onClick:()=>{l(),a()},disabled:c,...e,children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(tT.default,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:s("entityContextMenu.unregisterMenuTitle")})]}):null});var tS=n(50375),tN=n(11688),tL=n(9135),tB=n(20549);let tR=(0,tL.tK)("entity-context-menu-context"),t$=e=>{let{children:t,onMenuClose:n}=e;return(0,r.jsx)(tR.Provider,{value:(0,tB.B)({1:{onMenuClose:n}}),children:t})},tD=(0,k.A)(e=>({button:{color:e.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function tM(e){let{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,onUnregisterEntity:a,onInspectEntity:l}=e,{t:s}=(0,d.i)(y.W),[o,c]=(0,j.useState)(),u=tD(),p=(0,tw.A)(tE.Nf).allowed,h=()=>{c(void 0)},x=(0,C.gf)(tS.k),[g,m]=(0,tN.A)();(0,j.useEffect)(()=>{!g.error&&g.value&&x.post({message:s("entityContextMenu.copiedMessage"),severity:"info",display:"transient"})},[g,x,s]);let f=t?.length?[...t.map(e=>(0,r.jsxs)(tj.A,{onClick:()=>{h(),e.onClick()},children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(e.Icon,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:e.title})]},e.title)),(0,r.jsx)(tf.A,{},"the divider is here!")]:null,b=[(0,r.jsx)(tC,{unregisterEntityOptions:n,isUnregisterAllowed:p,onUnregisterEntity:a,onClose:h},"unregister-entity"),(0,r.jsxs)(tj.A,{onClick:()=>{h(),l()},children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(tA.default,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:s("entityContextMenu.inspectMenuTitle")})]},"inspect-entity"),(0,r.jsxs)(tj.A,{onClick:()=>{h(),m(window.location.toString())},children:[(0,r.jsx)(ez.A,{children:(0,r.jsx)(ty.default,{fontSize:"small"})}),(0,r.jsx)(eG.A,{primary:s("entityContextMenu.copyURLMenuTitle")})]},"copy-url")];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ew.Ay,{title:s("entityContextMenu.moreButtonTitle"),arrow:!0,children:(0,r.jsx)(eb.A,{"aria-label":s("entityContextMenu.moreButtonAriaLabel"),"aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!o,role:"button",onClick:e=>{c(e.currentTarget)},"data-testid":"menu-button",className:u.button,id:"long-menu",children:(0,r.jsx)(tk.default,{})})}),(0,r.jsx)(tv.Ay,{open:!!o,onClose:h,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu",PaperProps:{style:{minWidth:200}},children:(0,r.jsxs)(tb.A,{autoFocusItem:!!o,children:[f,void 0===i?b:(0,r.jsx)(t$,{onMenuClose:h,children:i})]})})]})}var tP=n(50714);function tO(e,t,n,i){let a,r=e??i?.kind??"",l=t??i?.metadata.namespace??"",s=i?.metadata.title??n??i?.metadata.name??"";return{headerTitle:`${s}${l&&l!==N.oQ?` in ${l}`:""}`,headerType:(a=r.toLocaleLowerCase("en-US"),i&&i.spec&&"type"in i.spec&&(a+=" — ",a+=i.spec.type.toLocaleLowerCase("en-US")),a)}}function tI(e=[],t=[]){for(let n of t){let t=e.find(e=>e.type===n);if(t)return t}return null}let tU=(0,k.A)(e=>({breadcrumbs:{color:e.page.fontColor,fontSize:e.typography.caption.fontSize,textTransform:"uppercase",marginTop:e.spacing(1),opacity:.8,"& span ":{color:e.page.fontColor,textDecoration:"underline",textUnderlineOffset:"3px"}}}));function t_(){let{entity:e}=(0,f.TY)(),{kind:t,namespace:n,name:i}=(0,o.K)(m.s),{headerTitle:a}=tO(t,n,i,e);return(0,r.jsxs)(w.A,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%",children:[(0,r.jsx)(w.A,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:e?(0,r.jsx)(L.d,{entityRef:e,hideIcon:!0}):a}),e&&(0,r.jsx)(P,{entity:e})]})}function tW(e){let{parentEntityRelations:t}=e,n=tU(),{entity:i}=(0,f.TY)(),{name:a}=(0,o.K)(m.s),l=tI(i?.relations??[],t??[]),s=(0,C.gf)(O.v),{value:c}=(0,A.A)(async()=>l?tI((await s.getEntityByRef(l?.targetRef))?.relations,t):null,[l,s]);return l?(0,r.jsxs)(E.B,{separator:">",className:n.breadcrumbs,children:[c&&(0,r.jsx)(I.z,{entityRef:c.targetRef,disableTooltip:!0}),(0,r.jsx)(I.z,{entityRef:l.targetRef,disableTooltip:!0}),a]}):null}function tF(e){let{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,parentEntityRelations:a,title:l,subtitle:s}=e,{entity:c}=(0,f.TY)(),{kind:d,namespace:u,name:p}=(0,o.K)(m.s),{headerTitle:h,headerType:x}=tO(d,u,p,c),g=(0,b.useLocation)(),y=(0,b.useNavigate)(),A=(0,S.S)(tP.rQ),k=(0,S.S)(tP.pS),[w,E]=(0,j.useState)(!1),C=(0,j.useCallback)(()=>E(!0),[E]),N=(0,j.useCallback)(()=>E(!1),[E]),L=(0,j.useCallback)(async()=>{E(!1),y(k?k():A())},[y,A,k,E]);(0,j.useEffect)(()=>{E(!1)},[g.pathname]);let[B,R]=(0,v.useSearchParams)(),$=B.get("inspect"),D=(0,j.useCallback)(e=>R(`inspect=${e}`),[R]),M=(0,j.useCallback)(()=>R("inspect"),[R]),P=(0,j.useCallback)(()=>R(),[R]);return(0,r.jsx)(T.Y,{pageTitleOverride:h,type:x,title:l??(0,r.jsx)(t_,{}),subtitle:s??(0,r.jsx)(tW,{parentEntityRelations:a}),children:c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(tm,{entity:c}),(0,r.jsx)(tM,{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,onInspectEntity:M,onUnregisterEntity:C}),(0,r.jsx)(tc,{entity:c,initialTab:$||void 0,open:"string"==typeof $,onClose:P,onSelect:D}),(0,r.jsx)(tu.I,{entity:c,open:w,onClose:N,onConfirm:L})]})})}var tz=n(93285),tG=n(21613);let tH=(0,k.A)(e=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:e.spacing(3),paddingBottom:e.spacing(3),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"EntityTabsPanel"});function tK(e){let{className:t,stretch:n,noPadding:i,children:a,...l}=e,s=tH();return(0,r.jsx)("article",{...l,className:X()(s.root,t,{[s.stretch]:n,[s.noPadding]:i}),children:a})}var tY=n(11192),tQ=n(99703),tX=n(7031),tV=n(6924),tZ=n(80615);function tq(e,t,n){if(n){if("string"==typeof e){let n=t.getIcon(e);return n?(0,r.jsx)(n,{}):void 0}return e}}let tJ=(0,j.forwardRef)(function(e,t){let[n,i]=(0,j.useState)(null),a=(0,C.gf)(tZ.s),l=!!n,{classes:s,className:o,disabled:c=!1,disableFocusRipple:d=!1,items:u,fullWidth:p,indicator:h,label:x,onSelectTab:g,selected:m,textColor:f="inherit",wrapped:y=!1,highlightedButton:b,showIcons:A=!1}=e,k=tq(e.icon,a,A),w="data-testid"in e&&e["data-testid"],E=()=>{i(null)},T=[s?.root,s?.[`textColor${(0,tY.A)(f)}`],s&&{[s.disabled]:c,[s.selected]:m,[s.labelIcon]:x&&k,[s.fullWidth]:p,[s.wrapped]:y},o];if(1===u.length)return(0,r.jsxs)(U.A,{focusRipple:!d,"data-testid":w,className:X()(T,s&&{[s.labelIcon]:x&&(u[0].icon??k)}),ref:t,role:"tab","aria-selected":m,disabled:c,component:v.Link,onClick:g,to:u[0]?.path,startIcon:tq(u[0].icon,a,A),children:[(0,r.jsx)(eK.A,{className:s?.wrapper,variant:"button",children:u[0].label}),h]});let S=A&&u.some(e=>e.icon);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(U.A,{"data-testid":w,focusRipple:!d,className:X()(T),ref:t,role:"tab","aria-selected":m,disabled:c,onClick:e=>{i(e.currentTarget)},startIcon:k,children:[(0,r.jsx)(eK.A,{className:s?.wrapper,variant:"button",children:x}),(0,r.jsx)(tV.default,{})]}),(0,r.jsx)(tv.Ay,{id:l?"tabbed-submenu":void 0,open:l,anchorEl:n,onClose:E,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,r.jsx)(eU.A,{component:"nav",children:u.map(e=>{let n=tq(e.icon,a,A);return(0,r.jsxs)(e_.A,{button:!0,focusRipple:!d,classes:{selected:X()(s?.selectedButton),default:X()(s?.unselectedButton),disabled:X()(s?.disabled)},ref:t,"aria-selected":m,disabled:c,selected:b===e.id,component:v.Link,onClick:e=>{E(),g?.(e)},to:e.path,children:[n&&(0,r.jsx)(ez.A,{children:n}),(0,r.jsx)(eG.A,{inset:!n&&S,primary:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eK.A,{variant:"button",children:e.label}),h]})})]},`popover_item_${e.id}`)})})})]})}),t0=(0,tX.A)(e=>(0,tQ.A)({root:{...e.typography.button,maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px",[e.breakpoints.up("sm")]:{padding:"6px 24px"},overflow:"hidden",whiteSpace:"normal",textAlign:"center",[e.breakpoints.up("sm")]:{minWidth:160}},defaultTab:{...e.typography.caption,padding:e.spacing(3,3),textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,color:e.palette.text.secondary},labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},selectedButton:{color:`${e.palette.text.primary}`,opacity:"1"},unselectedButton:{color:`${e.palette.text.secondary}`,opacity:"0.7"},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"row"}}),{name:"MuiTab"})(tJ),t1=(0,k.A)(e=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:e.palette.background.paper,paddingLeft:e.spacing(3),minWidth:0},defaultTab:{...e.typography.caption,padding:e.spacing(3,3),textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,color:e.palette.text.secondary},selected:{color:e.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:e.palette.background.default,color:e.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function t2(e,t,n){if(e)return t[e]?e:n[e]}function t5(e){let t=t1(),{t:n}=(0,d.i)(y.W),{tabs:i,selectedIndex:a=0,showIcons:l,groupDefinitions:s,defaultContentOrder:o="title"}=e,c=(0,j.useMemo)(()=>Object.entries(s).reduce((e,[t,n])=>{for(let i of n.aliases??[])e[i]=t;return e},{}),[s]),u=(0,j.useMemo)(()=>{let e=i.reduce((e,t)=>{let n=t2(t.group,s,c),i=n?s[n]:void 0,a=i&&n?n:t.id;return e[a]=e[a]??{group:i,items:[]},e[a].items.push(t),e},{}),t=Object.keys(s),n=Object.entries(e).sort(([e],[n])=>{let i=t.indexOf(e),a=t.indexOf(n);return -1!==i&&-1!==a?i-a:-1!==i?-1:+(-1!==a)});for(let[e,t]of n){let n=s[e];n&&"title"===(n.contentOrder??o)&&t.items.sort((e,t)=>e.label.localeCompare(t.label,void 0,{sensitivity:"base"}))}return n},[i,s,c,o]),p=i[a],h=t2(p?.group,s,c);return(0,r.jsx)(w.A,{className:t.tabsWrapper,children:(0,r.jsx)(H.A,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":n("entityTabs.tabsAriaLabel"),value:h??p?.id,children:u.map(([e,n])=>(0,r.jsx)(t0,{"data-testid":`header-tab-${e}`,className:t.defaultTab,classes:{selected:t.selected,root:t.tabRoot},label:n.group?.title,icon:n.group?.icon,value:e,items:n.items,highlightedButton:p?.id,showIcons:l},e))})})}function t3(e){let{routes:t,groupDefinitions:n,defaultContentOrder:i,showIcons:a}=e,{index:l,route:s,element:o}=function(e){let t=(0,b.useParams)(),n=e.map(({path:e,children:t})=>({caseSensitive:!1,path:`${e}/*`,element:t})).sort((e,t)=>t.path.replace(/\/\*$/,"").localeCompare(e.path.replace(/\/\*$/,""))),i=(0,b.useRoutes)(n)??e[0]?.children,a=t["*"]??"";a.startsWith("/")||(a=`/${a}`);let[r]=(0,tG.ue)(n,a)??[],l=r?e.findIndex(e=>`${e.path}/*`===r.route.path):0;return{index:-1===l?0:l,element:i,route:e[l]??e[0]}}(t),c=(0,j.useMemo)(()=>t.map(e=>{let{path:t,title:n,group:i,icon:a}=e,r=t;return{group:i,id:t,path:r=(r=r.replace(/\/\*$/,"")).replace(/^\//,""),label:n,icon:a}}),[t]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t5,{tabs:c,selectedIndex:l,showIcons:a,groupDefinitions:n,defaultContentOrder:i}),(0,r.jsxs)(tK,{children:[(0,r.jsx)(tz.m,{title:s?.title}),o]})]})}let t7="plugin.catalog.entityLayoutRoute",t4=()=>null;(0,s.h)(t4,t7,!0),(0,s.h)(t4,"core.gatherMountPoints",!0);let t6=e=>{let{UNSTABLE_extraContextMenuItems:t,UNSTABLE_contextMenuOptions:n,contextMenuItems:i,children:a,header:s,NotFoundComponent:j,parentEntityRelations:b,groupDefinitions:v,defaultContentOrder:A,showNavItemIcons:k}=e,{kind:w}=(0,o.K)(m.s),{entity:E,loading:T,error:C}=(0,f.TY)(),S=(0,c.O)(a,e=>e.selectByComponentData({key:t7,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:e})=>E&&(!e.if||e.if(E))?[{path:e.path,title:e.title,group:e.group,children:e.children,icon:e.icon}]:[]),[E]),{t:N}=(0,d.i)(y.W);return(0,r.jsxs)(u.Y,{themeId:E?.spec?.type?.toString()??"home",children:[s??(0,r.jsx)(tF,{parentEntityRelations:b,UNSTABLE_contextMenuOptions:n,UNSTABLE_extraContextMenuItems:t,contextMenuItems:i}),T&&(0,r.jsx)(p.k,{}),E&&(0,r.jsx)(t3,{routes:S,groupDefinitions:v,defaultContentOrder:A,showIcons:k}),C&&(0,r.jsx)(h.U,{children:(0,r.jsx)(l.A,{severity:"error",children:C.toString()})}),!T&&!C&&!E&&(0,r.jsx)(h.U,{children:j||(0,r.jsx)(x.B,{title:N("entityLabels.warningPanelTitle"),children:N("entityPage.notFoundMessage",{kind:w,link:(0,r.jsx)(g.N_,{to:"https://backstage.io/docs/features/software-catalog/references",children:N("entityPage.notFoundLinkText")})})})})]})};t6.Route=t4}}]);
|
|
2
|
+
//# sourceMappingURL=4445.b9a2649d.chunk.js.map
|