@backstage-community/plugin-explore 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/alpha.d.ts +37 -16
  3. package/dist/alpha.esm.js +2 -2
  4. package/dist/alpha.esm.js.map +1 -1
  5. package/dist/api/ExploreApi.esm.js.map +1 -1
  6. package/dist/api/ExploreClient.esm.js.map +1 -1
  7. package/dist/components/CatalogKindExploreContent/CatalogKindExploreContent.esm.js.map +1 -1
  8. package/dist/components/DefaultExplorePage/DefaultExplorePage.esm.js.map +1 -1
  9. package/dist/components/DomainCard/DomainCard.esm.js.map +1 -1
  10. package/dist/components/DomainExplorerContent/DomainExplorerContent.esm.js.map +1 -1
  11. package/dist/components/DomainExplorerContent/index.esm.js +5 -1
  12. package/dist/components/DomainExplorerContent/index.esm.js.map +1 -1
  13. package/dist/components/EntityCard/EntityCard.esm.js.map +1 -1
  14. package/dist/components/ExploreLayout/ExploreLayout.esm.js.map +1 -1
  15. package/dist/components/ExplorePage/ExplorePage.esm.js.map +1 -1
  16. package/dist/components/ExplorePage/index.esm.js +5 -1
  17. package/dist/components/ExplorePage/index.esm.js.map +1 -1
  18. package/dist/components/GroupsExplorerContent/GroupsDiagram.esm.js.map +1 -1
  19. package/dist/components/GroupsExplorerContent/GroupsExplorerContent.esm.js.map +1 -1
  20. package/dist/components/GroupsExplorerContent/index.esm.js +5 -1
  21. package/dist/components/GroupsExplorerContent/index.esm.js.map +1 -1
  22. package/dist/components/ToolCard/ToolCard.esm.js.map +1 -1
  23. package/dist/components/ToolExplorerContent/ToolExplorerContent.esm.js.map +1 -1
  24. package/dist/components/ToolExplorerContent/index.esm.js +5 -1
  25. package/dist/components/ToolExplorerContent/index.esm.js.map +1 -1
  26. package/dist/components/ToolSearchResultListItem/ToolSearchResultListItem.esm.js.map +1 -1
  27. package/dist/components/ToolSearchResultListItem/index.esm.js +5 -1
  28. package/dist/components/ToolSearchResultListItem/index.esm.js.map +1 -1
  29. package/dist/extensions.esm.js.map +1 -1
  30. package/dist/index.d.ts +10 -11
  31. package/dist/plugin.esm.js +2 -2
  32. package/dist/plugin.esm.js.map +1 -1
  33. package/dist/routes.esm.js.map +1 -1
  34. package/package.json +19 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @backstage-community/plugin-explore
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 21067f0: Backstage version bump to v1.49.2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [21067f0]
12
+ - @backstage-community/plugin-explore-common@0.13.0
13
+ - @backstage-community/plugin-explore-react@0.13.0
14
+
3
15
  ## 0.17.0
4
16
 
5
17
  ### Minor Changes
package/dist/alpha.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
3
- import * as React from 'react';
2
+ import * as react from 'react';
4
3
  import * as _backstage_plugin_search_react_alpha from '@backstage/plugin-search-react/alpha';
5
4
 
6
5
  /** @alpha */
@@ -14,9 +13,9 @@ declare const exploreSearchResultListItem: _backstage_frontend_plugin_api.Overri
14
13
  noTrack?: boolean | undefined;
15
14
  };
16
15
  output: _backstage_frontend_plugin_api.ExtensionDataRef<{
17
- predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate | undefined;
16
+ predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate;
18
17
  component: _backstage_plugin_search_react_alpha.SearchResultItemExtensionComponent;
19
- icon?: React.JSX.Element | undefined;
18
+ icon?: react.JSX.Element;
20
19
  }, "search.search-result-list-item.item", {}>;
21
20
  inputs: {};
22
21
  params: _backstage_plugin_search_react_alpha.SearchResultListItemBlueprintParams;
@@ -32,15 +31,17 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
32
31
  configInput: {};
33
32
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
34
33
  inputs: {};
35
- params: <TApi, TImpl extends TApi, TDeps extends {
36
- [x: string]: unknown;
37
- }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
34
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
38
35
  }>;
39
36
  "nav-item:explore": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
40
37
  kind: "nav-item";
41
38
  name: undefined;
42
- config: {};
43
- configInput: {};
39
+ config: {
40
+ title: string | undefined;
41
+ };
42
+ configInput: {
43
+ title?: string | undefined;
44
+ };
44
45
  output: _backstage_frontend_plugin_api.ExtensionDataRef<{
45
46
  title: string;
46
47
  icon: _backstage_frontend_plugin_api.IconComponent;
@@ -58,19 +59,39 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
58
59
  name: undefined;
59
60
  config: {
60
61
  path: string | undefined;
62
+ title: string | undefined;
61
63
  };
62
64
  configInput: {
63
65
  path?: string | undefined;
66
+ title?: string | undefined;
64
67
  };
65
- output: _backstage_frontend_plugin_api.ExtensionDataRef<React.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
68
+ output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
69
+ optional: true;
70
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", {
71
+ optional: true;
72
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
66
73
  optional: true;
67
74
  }>;
68
- inputs: {};
75
+ inputs: {
76
+ pages: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
77
+ optional: true;
78
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.title", {
79
+ optional: true;
80
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.IconElement, "core.icon", {
81
+ optional: true;
82
+ }>, {
83
+ singleton: false;
84
+ optional: false;
85
+ internal: false;
86
+ }>;
87
+ };
69
88
  params: {
70
- defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
71
89
  path: string;
72
- loader: () => Promise<JSX.Element>;
73
- routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
90
+ title?: string;
91
+ icon?: _backstage_frontend_plugin_api.IconElement;
92
+ loader?: () => Promise<react.JSX.Element>;
93
+ routeRef?: _backstage_frontend_plugin_api.RouteRef;
94
+ noHeader?: boolean;
74
95
  };
75
96
  }>;
76
97
  "search-result-list-item:explore": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
@@ -83,9 +104,9 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
83
104
  noTrack?: boolean | undefined;
84
105
  };
85
106
  output: _backstage_frontend_plugin_api.ExtensionDataRef<{
86
- predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate | undefined;
107
+ predicate?: _backstage_plugin_search_react_alpha.SearchResultItemExtensionPredicate;
87
108
  component: _backstage_plugin_search_react_alpha.SearchResultItemExtensionComponent;
88
- icon?: React.JSX.Element | undefined;
109
+ icon?: react.JSX.Element;
89
110
  }, "search.search-result-list-item.item", {}>;
90
111
  inputs: {};
91
112
  params: _backstage_plugin_search_react_alpha.SearchResultListItemBlueprintParams;
package/dist/alpha.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import LayersIcon from '@material-ui/icons/Layers';
3
- import { convertLegacyRouteRef, compatWrapper, convertLegacyRouteRefs } from '@backstage/core-compat-api';
4
- import { ApiBlueprint, discoveryApiRef, fetchApiRef, PageBlueprint, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
+ import { compatWrapper, convertLegacyRouteRef, convertLegacyRouteRefs } from '@backstage/core-compat-api';
4
+ import { ApiBlueprint, fetchApiRef, discoveryApiRef, PageBlueprint, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
5
5
  import { SearchResultListItemBlueprint } from '@backstage/plugin-search-react/alpha';
6
6
  import { ExploreClient } from './api/ExploreClient.esm.js';
7
7
  import { exploreApiRef } from './api/ExploreApi.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport LayersIcon from '@material-ui/icons/Layers';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n} from '@backstage/core-compat-api';\nimport {\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n ApiBlueprint,\n PageBlueprint,\n NavItemBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport { SearchResultListItemBlueprint } from '@backstage/plugin-search-react/alpha';\nimport { exploreApiRef, ExploreClient } from './api';\nimport { exploreRouteRef } from './routes';\n\n/** @alpha */\nconst exploreApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: exploreApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new ExploreClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nconst explorePage = PageBlueprint.make({\n params: {\n path: '/explore',\n routeRef: convertLegacyRouteRef(exploreRouteRef),\n loader: async () =>\n import('./components/ExplorePage').then(m =>\n compatWrapper(<m.ExplorePage />),\n ),\n },\n});\n\n/** @alpha */\nconst exploreNavItem = NavItemBlueprint.make({\n params: {\n icon: LayersIcon,\n routeRef: convertLegacyRouteRef(exploreRouteRef),\n title: 'Explore',\n },\n});\n\n/** @alpha */\nexport const exploreSearchResultListItem = SearchResultListItemBlueprint.make({\n params: {\n predicate: result => result.type === 'tools',\n component: () =>\n import('./components/ToolSearchResultListItem').then(\n m => m.ToolSearchResultListItem,\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'explore',\n extensions: [\n exploreApi,\n explorePage,\n exploreNavItem,\n exploreSearchResultListItem,\n ],\n routes: convertLegacyRouteRefs({\n explore: exploreRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;;;;AAmCA,MAAM,UAAA,GAAa,aAAa,IAAK,CAAA;AAAA,EACnC,MAAA,EAAQ,kBACN,YAAa,CAAA;AAAA,IACX,GAAK,EAAA,aAAA;AAAA,IACL,IAAM,EAAA;A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":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport LayersIcon from '@material-ui/icons/Layers';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n convertLegacyRouteRefs,\n} from '@backstage/core-compat-api';\nimport {\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n ApiBlueprint,\n PageBlueprint,\n NavItemBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport { SearchResultListItemBlueprint } from '@backstage/plugin-search-react/alpha';\nimport { exploreApiRef, ExploreClient } from './api';\nimport { exploreRouteRef } from './routes';\n\n/** @alpha */\nconst exploreApi = ApiBlueprint.make({\n params: defineParams =>\n defineParams({\n api: exploreApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new ExploreClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nconst explorePage = PageBlueprint.make({\n params: {\n path: '/explore',\n routeRef: convertLegacyRouteRef(exploreRouteRef),\n loader: async () =>\n import('./components/ExplorePage').then(m =>\n compatWrapper(<m.ExplorePage />),\n ),\n },\n});\n\n/** @alpha */\nconst exploreNavItem = NavItemBlueprint.make({\n params: {\n icon: LayersIcon,\n routeRef: convertLegacyRouteRef(exploreRouteRef),\n title: 'Explore',\n },\n});\n\n/** @alpha */\nexport const exploreSearchResultListItem = SearchResultListItemBlueprint.make({\n params: {\n predicate: result => result.type === 'tools',\n component: () =>\n import('./components/ToolSearchResultListItem').then(\n m => m.ToolSearchResultListItem,\n ),\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'explore',\n extensions: [\n exploreApi,\n explorePage,\n exploreNavItem,\n exploreSearchResultListItem,\n ],\n routes: convertLegacyRouteRefs({\n explore: exploreRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;;;;AAmCA,MAAM,UAAA,GAAa,aAAa,IAAA,CAAK;AAAA,EACnC,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,aAAA;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,YAAA,EAAc,eAAA;AAAA,MACd,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,aAAA,CAAc,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,GAC/C;AACL,CAAC,CAAA;AAGD,MAAM,WAAA,GAAc,cAAc,IAAA,CAAK;AAAA,EACrC,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,UAAA;AAAA,IACN,QAAA,EAAU,sBAAsB,eAAe,CAAA;AAAA,IAC/C,MAAA,EAAQ,YACN,OAAO,uCAA0B,CAAA,CAAE,IAAA;AAAA,MAAK,OACtC,aAAA,iBAAc,GAAA,CAAC,CAAA,CAAE,WAAA,EAAF,EAAc,CAAE;AAAA;AACjC;AAEN,CAAC,CAAA;AAGD,MAAM,cAAA,GAAiB,iBAAiB,IAAA,CAAK;AAAA,EAC3C,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,UAAA;AAAA,IACN,QAAA,EAAU,sBAAsB,eAAe,CAAA;AAAA,IAC/C,KAAA,EAAO;AAAA;AAEX,CAAC,CAAA;AAGM,MAAM,2BAAA,GAA8B,8BAA8B,IAAA,CAAK;AAAA,EAC5E,MAAA,EAAQ;AAAA,IACN,SAAA,EAAW,CAAA,MAAA,KAAU,MAAA,CAAO,IAAA,KAAS,OAAA;AAAA,IACrC,SAAA,EAAW,MACT,OAAO,oDAAuC,CAAA,CAAE,IAAA;AAAA,MAC9C,OAAK,CAAA,CAAE;AAAA;AACT;AAEN,CAAC;AAGD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,SAAA;AAAA,EACV,UAAA,EAAY;AAAA,IACV,UAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,QAAQ,sBAAA,CAAuB;AAAA,IAC7B,OAAA,EAAS;AAAA,GACV;AACH,CAAC,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExploreApi.esm.js","sources":["../../src/api/ExploreApi.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\n\n/**\n * Interface for the explore plugin.\n *\n * @public\n */\nexport interface ExploreApi {\n /**\n * Returns a list of explore tools.\n *\n * @param request - The request query options\n */\n getTools(request?: GetExploreToolsRequest): Promise<GetExploreToolsResponse>;\n}\n\n/**\n * @public\n */\nexport const exploreApiRef = createApiRef<ExploreApi>({\n id: 'plugin.explore.service',\n});\n"],"names":[],"mappings":";;AAuCO,MAAM,gBAAgB,YAAyB,CAAA;AAAA,EACpD,EAAI,EAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"ExploreApi.esm.js","sources":["../../src/api/ExploreApi.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\n\n/**\n * Interface for the explore plugin.\n *\n * @public\n */\nexport interface ExploreApi {\n /**\n * Returns a list of explore tools.\n *\n * @param request - The request query options\n */\n getTools(request?: GetExploreToolsRequest): Promise<GetExploreToolsResponse>;\n}\n\n/**\n * @public\n */\nexport const exploreApiRef = createApiRef<ExploreApi>({\n id: 'plugin.explore.service',\n});\n"],"names":[],"mappings":";;AAuCO,MAAM,gBAAgB,YAAA,CAAyB;AAAA,EACpD,EAAA,EAAI;AACN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExploreClient.esm.js","sources":["../../src/api/ExploreClient.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\nimport { ExploreToolsConfig } from '@backstage-community/plugin-explore-react';\nimport { ExploreApi } from './ExploreApi';\n\n/**\n * Default implementation of the {@link ExploreApi}.\n *\n * @public\n */\nexport class ExploreClient implements ExploreApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n private readonly exploreToolsConfig: ExploreToolsConfig | undefined;\n\n /**\n * @remarks\n *\n * The `exploreToolsConfig` is for backwards compatibility with the `exploreToolsConfigRef`•\n * and will be removed in the future.\n */\n constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n exploreToolsConfig?: ExploreToolsConfig;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n this.exploreToolsConfig = options.exploreToolsConfig;\n }\n\n async getTools(\n request: GetExploreToolsRequest = {},\n ): Promise<GetExploreToolsResponse> {\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n if (this.exploreToolsConfig) {\n const tools = await this.exploreToolsConfig.getTools();\n if (tools) {\n return { tools };\n }\n }\n\n const { fetch } = this.fetchApi;\n\n const filter = request.filter ?? {};\n const baseUrl = await this.discoveryApi.getBaseUrl('explore');\n\n const tags = filter?.tags?.map(t => `tag=${encodeURIComponent(t)}`) ?? [];\n const lifecycles =\n filter?.lifecycle?.map(l => `lifecycle=${encodeURIComponent(l)}`) ?? [];\n const query = [...tags, ...lifecycles].join('&');\n\n const response = await fetch(`${baseUrl}/tools${query ? `?${query}` : ''}`);\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<GetExploreToolsResponse>;\n }\n}\n"],"names":[],"mappings":";;AA8BO,MAAM,aAAoC,CAAA;AAAA,EAC9B,YAAA;AAAA,EACA,QAAA;AAAA;AAAA,EAEA,kBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjB,YAAY,OAIT,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA;AACxB,IAAA,IAAA,CAAK,q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
1
+ {"version":3,"file":"ExploreClient.esm.js","sources":["../../src/api/ExploreClient.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\nimport { ExploreToolsConfig } from '@backstage-community/plugin-explore-react';\nimport { ExploreApi } from './ExploreApi';\n\n/**\n * Default implementation of the {@link ExploreApi}.\n *\n * @public\n */\nexport class ExploreClient implements ExploreApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n private readonly exploreToolsConfig: ExploreToolsConfig | undefined;\n\n /**\n * @remarks\n *\n * The `exploreToolsConfig` is for backwards compatibility with the `exploreToolsConfigRef`•\n * and will be removed in the future.\n */\n constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n exploreToolsConfig?: ExploreToolsConfig;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n this.exploreToolsConfig = options.exploreToolsConfig;\n }\n\n async getTools(\n request: GetExploreToolsRequest = {},\n ): Promise<GetExploreToolsResponse> {\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n if (this.exploreToolsConfig) {\n const tools = await this.exploreToolsConfig.getTools();\n if (tools) {\n return { tools };\n }\n }\n\n const { fetch } = this.fetchApi;\n\n const filter = request.filter ?? {};\n const baseUrl = await this.discoveryApi.getBaseUrl('explore');\n\n const tags = filter?.tags?.map(t => `tag=${encodeURIComponent(t)}`) ?? [];\n const lifecycles =\n filter?.lifecycle?.map(l => `lifecycle=${encodeURIComponent(l)}`) ?? [];\n const query = [...tags, ...lifecycles].join('&');\n\n const response = await fetch(`${baseUrl}/tools${query ? `?${query}` : ''}`);\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<GetExploreToolsResponse>;\n }\n}\n"],"names":[],"mappings":";;AA8BO,MAAM,aAAA,CAAoC;AAAA,EAC9B,YAAA;AAAA,EACA,QAAA;AAAA;AAAA,EAEA,kBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjB,YAAY,OAAA,EAIT;AACD,IAAA,IAAA,CAAK,eAAe,OAAA,CAAQ,YAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAA,CAAQ,QAAA;AACxB,IAAA,IAAA,CAAK,qBAAqB,OAAA,CAAQ,kBAAA;AAAA,EACpC;AAAA,EAEA,MAAM,QAAA,CACJ,OAAA,GAAkC,EAAC,EACD;AAElC,IAAA,IAAI,KAAK,kBAAA,EAAoB;AAC3B,MAAA,MAAM,KAAA,GAAQ,MAAM,IAAA,CAAK,kBAAA,CAAmB,QAAA,EAAS;AACrD,MAAA,IAAI,KAAA,EAAO;AACT,QAAA,OAAO,EAAE,KAAA,EAAM;AAAA,MACjB;AAAA,IACF;AAEA,IAAA,MAAM,EAAE,KAAA,EAAM,GAAI,IAAA,CAAK,QAAA;AAEvB,IAAA,MAAM,MAAA,GAAS,OAAA,CAAQ,MAAA,IAAU,EAAC;AAClC,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,YAAA,CAAa,WAAW,SAAS,CAAA;AAE5D,IAAA,MAAM,IAAA,GAAO,MAAA,EAAQ,IAAA,EAAM,GAAA,CAAI,CAAA,CAAA,KAAK,CAAA,IAAA,EAAO,kBAAA,CAAmB,CAAC,CAAC,CAAA,CAAE,CAAA,IAAK,EAAC;AACxE,IAAA,MAAM,UAAA,GACJ,MAAA,EAAQ,SAAA,EAAW,GAAA,CAAI,CAAA,CAAA,KAAK,CAAA,UAAA,EAAa,kBAAA,CAAmB,CAAC,CAAC,CAAA,CAAE,CAAA,IAAK,EAAC;AACxE,IAAA,MAAM,KAAA,GAAQ,CAAC,GAAG,IAAA,EAAM,GAAG,UAAU,CAAA,CAAE,KAAK,GAAG,CAAA;AAE/C,IAAA,MAAM,QAAA,GAAW,MAAM,KAAA,CAAM,CAAA,EAAG,OAAO,CAAA,MAAA,EAAS,KAAA,GAAQ,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA,GAAK,EAAE,CAAA,CAAE,CAAA;AAE1E,IAAA,IAAI,CAAC,SAAS,EAAA,EAAI;AAChB,MAAA,MAAM,MAAM,aAAA,CAAc,YAAA,CAAa,QAAQ,CAAA;AAAA,IACjD;AAEA,IAAA,OAAO,SAAS,IAAA,EAAK;AAAA,EACvB;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogKindExploreContent.esm.js","sources":["../../../src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport useAsync from 'react-use/esm/useAsync';\nimport { EntityCard } from '../EntityCard';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport pluralize from 'pluralize';\n\nconst Body = (props: { kind: string }) => {\n const { kind } = props;\n const kindPlural = pluralize(kind);\n const catalogApi = useApi(catalogApiRef);\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: { kind },\n });\n return response.items as Entity[];\n }, [kind]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <WarningPanel severity=\"error\" title={`Could not load ${kindPlural}.`}>\n {error.message}\n </WarningPanel>\n );\n }\n\n if (!entities?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title={`No ${kindPlural} to display`}\n description={`You haven't added any ${kindPlural} yet.`}\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href={`https://backstage.io/docs/features/software-catalog/descriptor-format#kind-${kind}`}\n >\n Read more\n </Button>\n }\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {entities.map((entity, index) => (\n <EntityCard key={index} entity={entity} />\n ))}\n </ItemCardGrid>\n );\n};\n\n/** @public */\nexport const CatalogKindExploreContent = (props: {\n title?: string;\n kind: string;\n}) => {\n const { kind, title } = props;\n const kindLowercase = kind.toLocaleLowerCase();\n const kindCapitalized = `${kind[0].toLocaleUpperCase()}${kind.substring(1)}`;\n return (\n <Content noPadding>\n <ContentHeader title={title || `${pluralize(kindCapitalized)}`}>\n <SupportButton>\n <>Discover the {pluralize(kindLowercase)} in your ecosystem.</>\n </SupportButton>\n </ContentHeader>\n <Body kind={kindLowercase} />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAiCA,MAAM,IAAA,GAAO,CAAC,KAA4B,KAAA;AACxC,EAAM,MAAA,EAAE,MAAS,GAAA,KAAA;AACjB,EAAM,MAAA,UAAA,GAAa,UAAU,IAAI,CAAA;AACjC,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,QAAA;AAAA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pC,KAAA;AACJ,EAAM,MAAA,EAAE,IAAM,EAAA,KAAA,EAAU,GAAA,KAAA;AACxB,EAAM,MAAA,aAAA,GAAgB,KAAK,iBAAkB,EAAA;AAC7C,EAAM,MAAA,eAAA,GAAkB,CAAG,EAAA,IAAA,CAAK,CAAC,CAAA,CAAE,iBAAkB,EAAC,CAAG,EAAA,IAAA,CAAK,SAAU,CAAA,CAAC,CAAC,CAAA,CAAA;AAC1E,EACE,uBAAA,IAAA,CAAC,OAAQ,EAAA,EAAA,SAAA,EAAS,IAChB,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,aAAA,EAAA,EAAc,KAAO,EAAA,KAAA,IAAS,CAAG,EAAA,SAAA,CAAU,eAAe,CAAC,CAAA,CAAA,EAC1D,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EACC,QAAE,kBAAA,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,MAAA,eAAA;AAAA,MAAc,UAAU,aAAa,CAAA;AAAA,MAAE;AAAA,KAAA,EAAmB,GAC9D,CACF,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAM,aAAe,EAAA;AAAA,GAC7B,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"CatalogKindExploreContent.esm.js","sources":["../../../src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport useAsync from 'react-use/esm/useAsync';\nimport { EntityCard } from '../EntityCard';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport pluralize from 'pluralize';\n\nconst Body = (props: { kind: string }) => {\n const { kind } = props;\n const kindPlural = pluralize(kind);\n const catalogApi = useApi(catalogApiRef);\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: { kind },\n });\n return response.items as Entity[];\n }, [kind]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <WarningPanel severity=\"error\" title={`Could not load ${kindPlural}.`}>\n {error.message}\n </WarningPanel>\n );\n }\n\n if (!entities?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title={`No ${kindPlural} to display`}\n description={`You haven't added any ${kindPlural} yet.`}\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href={`https://backstage.io/docs/features/software-catalog/descriptor-format#kind-${kind}`}\n >\n Read more\n </Button>\n }\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {entities.map((entity, index) => (\n <EntityCard key={index} entity={entity} />\n ))}\n </ItemCardGrid>\n );\n};\n\n/** @public */\nexport const CatalogKindExploreContent = (props: {\n title?: string;\n kind: string;\n}) => {\n const { kind, title } = props;\n const kindLowercase = kind.toLocaleLowerCase();\n const kindCapitalized = `${kind[0].toLocaleUpperCase()}${kind.substring(1)}`;\n return (\n <Content noPadding>\n <ContentHeader title={title || `${pluralize(kindCapitalized)}`}>\n <SupportButton>\n <>Discover the {pluralize(kindLowercase)} in your ecosystem.</>\n </SupportButton>\n </ContentHeader>\n <Body kind={kindLowercase} />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAiCA,MAAM,IAAA,GAAO,CAAC,KAAA,KAA4B;AACxC,EAAA,MAAM,EAAE,MAAK,GAAI,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AAS,GAAA,CAAI,CAAC,MAAA,EAAQ,KAAA,qBACrB,GAAA,CAAC,UAAA,EAAA,EAAuB,MAAA,EAAA,EAAP,KAAuB,CACzC,CAAA,EACH,CAAA;AAEJ,CAAA;AAGO,MAAM,yBAAA,GAA4B,CAAC,KAAA,KAGpC;AACJ,EAAA,MAAM,EAAE,IAAA,EAAM,KAAA,EAAM,GAAI,KAAA;AACxB,EAAA,MAAM,aAAA,GAAgB,KAAK,iBAAA,EAAkB;AAC7C,EAAA,MAAM,eAAA,GAAkB,CAAA,EAAG,IAAA,CAAK,CAAC,CAAA,CAAE,iBAAA,EAAmB,CAAA,EAAG,IAAA,CAAK,SAAA,CAAU,CAAC,CAAC,CAAA,CAAA;AAC1E,EAAA,uBACE,IAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAS,IAAA,EAChB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,KAAA,EAAO,KAAA,IAAS,CAAA,EAAG,SAAA,CAAU,eAAe,CAAC,CAAA,CAAA,EAC1D,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAA,QAAA,EAAA,EAAE,QAAA,EAAA;AAAA,MAAA,eAAA;AAAA,MAAc,UAAU,aAAa,CAAA;AAAA,MAAE;AAAA,KAAA,EAAmB,GAC9D,CAAA,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAM,aAAA,EAAe;AAAA,GAAA,EAC7B,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultExplorePage.esm.js","sources":["../../../src/components/DefaultExplorePage/DefaultExplorePage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExploreLayout } from '../ExploreLayout';\nimport { GroupsExplorerContent } from '../GroupsExplorerContent';\nimport { ToolExplorerContent } from '../ToolExplorerContent';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { CatalogKindExploreContent } from '../CatalogKindExploreContent';\n\nexport const DefaultExplorePage = () => {\n const configApi = useApi(configApiRef);\n const organizationName =\n configApi.getOptionalString('organization.name') ?? 'Backstage';\n\n return (\n <ExploreLayout\n title={`Explore the ${organizationName} ecosystem`}\n subtitle=\"Discover solutions available in your ecosystem\"\n >\n <ExploreLayout.Route path=\"domains\" title=\"Domains\">\n <CatalogKindExploreContent kind=\"domain\" />\n </ExploreLayout.Route>\n <ExploreLayout.Route path=\"groups\" title=\"Groups\">\n <GroupsExplorerContent />\n </ExploreLayout.Route>\n <ExploreLayout.Route path=\"tools\" title=\"Tools\">\n <ToolExplorerContent />\n </ExploreLayout.Route>\n </ExploreLayout>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsBO,MAAM,qBAAqB,MAAM;AACtC,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,gBACJ,GAAA,SAAA,CAAU,iBAAkB,CAAA,mBAAmB,CAAK,IAAA,WAAA;AAEtD,EACE,uBAAA,IAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,eAAe,gBAAgB,CAAA,UAAA,CAAA;AAAA,MACtC,QAAS,EAAA,gDAAA;AAAA,MAET,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,aAAA,CAAc,KAAd,EAAA,EAAoB,IAAK,EAAA,SAAA,EAAU,KAAM,EAAA,SAAA,EACxC,QAAC,kBAAA,GAAA,CAAA,yBAAA,EAAA,EAA0B,IAAK,EAAA,QAAA,EAAS,CAC3C,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,aAAc,CAAA,KAAA,EAAd,EAAoB,IAAA,EAAK,UAAS,KAAM,EAAA,QAAA,EACvC,QAAC,kBAAA,GAAA,CAAA,qBAAA,EAAA,EAAsB,CACzB,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,aAAc,CAAA,KAAA,EAAd,EAAoB,IAAA,EAAK,SAAQ,KAAM,EAAA,OAAA,EACtC,QAAC,kBAAA,GAAA,CAAA,mBAAA,EAAA,EAAoB,CACvB,EAAA;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"DefaultExplorePage.esm.js","sources":["../../../src/components/DefaultExplorePage/DefaultExplorePage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExploreLayout } from '../ExploreLayout';\nimport { GroupsExplorerContent } from '../GroupsExplorerContent';\nimport { ToolExplorerContent } from '../ToolExplorerContent';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { CatalogKindExploreContent } from '../CatalogKindExploreContent';\n\nexport const DefaultExplorePage = () => {\n const configApi = useApi(configApiRef);\n const organizationName =\n configApi.getOptionalString('organization.name') ?? 'Backstage';\n\n return (\n <ExploreLayout\n title={`Explore the ${organizationName} ecosystem`}\n subtitle=\"Discover solutions available in your ecosystem\"\n >\n <ExploreLayout.Route path=\"domains\" title=\"Domains\">\n <CatalogKindExploreContent kind=\"domain\" />\n </ExploreLayout.Route>\n <ExploreLayout.Route path=\"groups\" title=\"Groups\">\n <GroupsExplorerContent />\n </ExploreLayout.Route>\n <ExploreLayout.Route path=\"tools\" title=\"Tools\">\n <ToolExplorerContent />\n </ExploreLayout.Route>\n </ExploreLayout>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAsBO,MAAM,qBAAqB,MAAM;AACtC,EAAA,MAAM,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,gBAAA,GACJ,SAAA,CAAU,iBAAA,CAAkB,mBAAmB,CAAA,IAAK,WAAA;AAEtD,EAAA,uBACE,IAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,eAAe,gBAAgB,CAAA,UAAA,CAAA;AAAA,MACtC,QAAA,EAAS,gDAAA;AAAA,MAET,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,aAAA,CAAc,KAAA,EAAd,EAAoB,IAAA,EAAK,SAAA,EAAU,KAAA,EAAM,SAAA,EACxC,QAAA,kBAAA,GAAA,CAAC,yBAAA,EAAA,EAA0B,IAAA,EAAK,QAAA,EAAS,CAAA,EAC3C,CAAA;AAAA,wBACA,GAAA,CAAC,aAAA,CAAc,KAAA,EAAd,EAAoB,IAAA,EAAK,UAAS,KAAA,EAAM,QAAA,EACvC,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAsB,CAAA,EACzB,CAAA;AAAA,wBACA,GAAA,CAAC,aAAA,CAAc,KAAA,EAAd,EAAoB,IAAA,EAAK,SAAQ,KAAA,EAAM,OAAA,EACtC,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,CAAA,EACvB;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DomainCard.esm.js","sources":["../../../src/components/DomainCard/DomainCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DomainEntity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const DomainCard = (props: { entity: DomainEntity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description}\n </CardContent>\n <CardActions>\n <LinkButton to={url} color=\"primary\">\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCa,MAAA,UAAA,GAAa,CAAC,KAAoC,KAAA;AAC7D,EAAM,MAAA,EAAE,QAAW,GAAA,KAAA;AAEnB,EAAM,MAAA,kBAAA,GAAqB,YAAY,cAAc,CAAA;AACrD,EAAM,MAAA,gBAAA,GAAmB,kBAAmB,CAAA,MAAA,EAAQ,iBAAiB,CAAA;AACrE,EAAA,MAAM,GAAM,GAAA,kBAAA,CAAmB,iBAAkB,CAAA,MAAM,CAAC,CAAA;AAExD,EAAA,MAAM,KACJ,mBAAA,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,gBAAA;AAAA,MACZ,WAAY,EAAA,OAAA;AAAA,MACZ,KAAM,EAAA;AAAA;AAAA,GACR;AAGF,EAAA,4BACG,IACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,cAAA;AAAA,MAAA;AAAA,QACC,KAAO,EAAA,MAAA,CAAO,QAAS,CAAA,KAAA,IAAS,OAAO,QAAS,CAAA,IAAA;AAAA,QAChD,QAAU,EAAA;AAAA;AAAA,KAEd,EAAA,CAAA;AAAA,yBACC,WACE,EAAA,EAAA,QAAA,EAAA;AAAA,MAAA,MAAA,CAAO,SAAS,IAAM,EAAA,MAAA,uBACpB,GACE,EAAA,EAAA,QAAA,EAAA,MAAA,CAAO,SAAS,IAAK,CAAA,GAAA,CAAI,yBACvB,GAAA,CAAA,IAAA,EAAA,EAAK,MAAK,OAAQ,EAAA,KAAA,EAAO,OAAU,GAAK,CAC1C,GACH,CACE,GAAA,IAAA;AAAA,MACH,OAAO,QAAS,CAAA;AAAA,KACnB,EAAA,CAAA;AAAA,oBACA,GAAA,CAAC,eACC,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,IAAI,GAAK,EAAA,KAAA,EAAM,SAAU,EAAA,QAAA,EAAA,SAAA,EAErC,CACF,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"DomainCard.esm.js","sources":["../../../src/components/DomainCard/DomainCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DomainEntity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const DomainCard = (props: { entity: DomainEntity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description}\n </CardContent>\n <CardActions>\n <LinkButton to={url} color=\"primary\">\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCO,MAAM,UAAA,GAAa,CAAC,KAAA,KAAoC;AAC7D,EAAA,MAAM,EAAE,QAAO,G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components/DomainExplorerContent/DomainExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DomainEntity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { EntityCard } from '../EntityCard';\n\nconst Body = () => {\n const catalogApi = useApi(catalogApiRef);\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: { kind: 'domain' },\n });\n return response.items as DomainEntity[];\n }, [catalogApi]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <WarningPanel severity=\"error\" title=\"Could not load domains.\">\n {error.message}\n </WarningPanel>\n );\n }\n\n if (!entities?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title=\"No domains to display\"\n description=\"You haven't added any domains yet.\"\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain\"\n >\n Read more\n </Button>\n }\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {entities.map((entity, index) => (\n <EntityCard key={index} entity={entity} />\n ))}\n </ItemCardGrid>\n );\n};\n\n/** @public */\nexport const DomainExplorerContent = (props: { title?: string }) => {\n return (\n <Content noPadding>\n <ContentHeader title={props.title ?? 'Domains'}>\n <Sup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A,EAAA,MAAA,EAAA,EAAP,KAAuB,CACzC,CACH,EAAA,CAAA;AAEJ,CAAA;AAGa,MAAA,qBAAA,GAAwB,CAAC,KAA8B,KAAA;AAClE,EACE,uBAAA,IAAA,CAAC,OAAQ,EAAA,EAAA,SAAA,EAAS,IAChB,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,aAAA,EAAA,EAAc,OAAO,KAAM,CAAA,KAAA,IAAS,WACnC,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,qDAAuC,CACxD,EAAA,CAAA;AAAA,wBACC,IAAK,EAAA,EAAA;AAAA,GACR,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"DomainExplorerContent.esm.js","sources":["../../../src/components/DomainExplorerContent/DomainExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DomainEntity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { EntityCard } from '../EntityCard';\n\nconst Body = () => {\n const catalogApi = useApi(catalogApiRef);\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: { kind: 'domain' },\n });\n return response.items as DomainEntity[];\n }, [catalogApi]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <WarningPanel severity=\"error\" title=\"Could not load domains.\">\n {error.message}\n </WarningPanel>\n );\n }\n\n if (!entities?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title=\"No domains to display\"\n description=\"You haven't added any domains yet.\"\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain\"\n >\n Read more\n </Button>\n }\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {entities.map((entity, index) => (\n <EntityCard key={index} entity={entity} />\n ))}\n </ItemCardGrid>\n );\n};\n\n/** @public */\nexport const DomainExplorerContent = (props: { title?: string }) => {\n return (\n <Content noPadding>\n <ContentHeader title={props.title ?? 'Domains'}>\n <SupportButton>Discover the domains in your ecosystem.</SupportButton>\n </ContentHeader>\n <Body />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAgCA,MAAM,OAAO,MAAM;AACjB,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAA,MAAM;AAAA,IACJ,KAAA,EAAO,QAAA;AAAA,IACP,OAAA;AAAA,IACA;AAAA,GACF,GAAI,SAAS,YAAY;AACvB,IAAA,MAAM,QAAA,GAAW,MAAM,UAAA,CAAW,WAAA,CAAY;AAAA,MAC5C,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA;AAAS,KAC1B,CAAA;AACD,IAAA,OAAO,QAAA,CAAS,KAAA;AAAA,EAClB,CAAA,EAAG,CAAC,UAAU,CAAC,CAAA;AAEf,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB;AAEA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,2BACG,YAAA,EAAA,EAAa,QAAA,EAAS,SAAQ,KAAA,EAAM,yBAAA,EAClC,gBAAM,OAAA,EACT,CAAA;AAAA,EAEJ;AAEA,EAAA,IAAI,CAAC,UAAU,MAAA,EAAQ;AACrB,IAAA,uBACE,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,MAAA;AAAA,QACR,KAAA,EAAM,uBAAA;AAAA,QACN,WAAA,EAAY,oCAAA;AAAA,QACZ,MAAA,kBACE,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,OAAA,EAAQ,WAAA;AAAA,YACR,KAAA,EAAM,SAAA;AAAA,YACN,IAAA,EAAK,mFAAA;AAAA,YACN,QAAA,EAAA;AAAA;AAAA;AAED;AAAA,KAEJ;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,YAAA,EAAA,EACE,QAAA,EAAA,QAAA,CAAS,GAAA,CAAI,CAAC,MAAA,EAAQ,KAAA,qBACrB,GAAA,CAAC,UAAA,EAAA,EAAuB,MAAA,EAAA,EAAP,KAAuB,CACzC,CAAA,EACH,CAAA;AAEJ,CAAA;AAGO,MAAM,qBAAA,GAAwB,CAAC,KAAA,KAA8B;AAClE,EAAA,uBACE,IAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAS,IAAA,EAChB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,OAAO,KAAA,CAAM,KAAA,IAAS,WACnC,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,qDAAuC,CAAA,EACxD,CAAA;AAAA,wBACC,IAAA,EAAA,EAAK;AAAA,GAAA,EACR,CAAA;AAEJ;;;;"}
@@ -1,2 +1,6 @@
1
- export { DomainExplorerContent } from './DomainExplorerContent.esm.js';
1
+ import { DomainExplorerContent } from './DomainExplorerContent.esm.js';
2
+
3
+
4
+
5
+ export { DomainExplorerContent };
2
6
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityCard.esm.js","sources":["../../../src/components/EntityCard/EntityCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const EntityCard = (props: { entity: Entity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description}\n </CardContent>\n <CardActions>\n <LinkButton to={url} color=\"primary\">\n Explore\n </LinkButton>\n </CardActions>\n </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SAAA,EAErC,CACF,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityCard.esm.js","sources":["../../../src/components/EntityCard/EntityCard.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const EntityCard = (props: { entity: Entity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description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,UAAA,EAAA,EAAW,IAAI,GAAA,EAAK,KAAA,EAAM,SAAA,EAAU,QAAA,EAAA,SAAA,EAErC,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExploreLayout.esm.js","sources":["../../../src/components/ExploreLayout/ExploreLayout.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Header, Page, RoutedTabs } from '@backstage/core-components';\nimport {\n attachComponentData,\n useElementFilter,\n} from '@backstage/core-plugin-api';\nimport { TabProps } from '@material-ui/core/Tab';\nimport { default as React } from 'react';\n\n// TODO: This layout could be a shared based component if it was possible to create custom TabbedLayouts\n// A generalized version of createSubRoutesFromChildren, etc. would be required\n/** @public */\nexport type SubRoute = {\n path: string;\n title: string;\n children: JSX.Element;\n tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;\n};\n\nconst dataKey = 'plugin.explore.exploreLayoutRoute';\n\nconst Route: (props: SubRoute) => null = () => null;\nattachComponentData(Route, dataKey, true);\n\n// This causes all mount points that are discovered within this route to use the path of the route itself\nattachComponentData(Route, 'core.gatherMountPoints', true);\n\n/** @public */\nexport type ExploreLayoutProps = {\n title?: string;\n subtitle?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Explore is a compound component, which allows you to define a custom layout\n *\n * @example\n * ```jsx\n * <ExploreLayout title=\"Explore ACME's ecosystem\">\n * <ExploreLayout.Route path=\"/example\" title=\"Example tab\">\n * <div>This is rendered under /example/anything-here route</div>\n * </ExploreLayout.Route>\n * </ExploreLayout>\n * ```\n *\n * @public\n */\nexport const ExploreLayout = (props: ExploreLayoutProps) => {\n const { title, subtitle, children } = props;\n\n const routes = useElementFilter(children, elements =>\n elements\n .selectByComponentData({\n key: dataKey,\n withStrictError:\n 'Child of ExploreLayout must be an ExploreLayout.Route',\n })\n .getElements<SubRoute>()\n .map(child => child.props),\n );\n\n return (\n <Page themeId=\"home\">\n <Header\n title={title ?? 'Explore our ecosystem'}\n subtitle={subtitle ?? 'Discover solutions available in our ecosystem'}\n />\n <RoutedTabs routes={routes} />\n </Page>\n );\n};\n\nExploreLayout.Route = Route;\n"],"names":[],"mappings":";;;;AAkCA,MAAM,OAAU,GAAA,mCAAA;AAEhB,MAAM,QAAmC,MAAM,IAAA;AAC/C,mBAAoB,CAAA,KAAA,EAAO,SAAS,IAAI,CAAA;AAGxC,mBAAoB,CAAA,KAAA,EAAO,0BAA0B,IAAI,CAAA;AAuB5C,MAAA,aAAA,GAAgB,CAAC,KAA8B,KAAA;AAC1D,EAAA,MAAM,EAAE,KAAA,EAAO,QAAU,EAAA,QAAA,EAAa,GAAA,KAAA;AAEtC,EAAA,MAAM,MAAS,GAAA,gBAAA;AAAA,IAAiB,QAAA;AAAA,IAAU,CAAA,QAAA,KACxC,SACG,qBAAsB,CAAA;AAAA,MACrB,GAAK,EAAA,OAAA;AAAA,MACL,eACE,EAAA;AAAA,KACH,CACA,CAAA,WAAA,GACA,GAAI,CAAA,CAAA,KAAA,KAAS,MAAM,KAAK;AAAA,GAC7B;AAEA,EACE,uBAAA,IAAA,CAAC,IAAK,EAAA,EAAA,OAAA,EAAQ,MACZ,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAO,KAAS,IAAA,uBAAA;AAAA,QAChB,UAAU,QAAY,IAAA;AAAA;AAAA,KACxB;AAAA,oBACA,GAAA,CAAC,cAAW,MAAgB,EAAA;AAAA,GAC9B,EAAA,CAAA;AAEJ;AAEA,aAAA,CAAc,KAAQ,GAAA,KAAA;;;;"}
1
+ {"version":3,"file":"ExploreLayout.esm.js","sources":["../../../src/components/ExploreLayout/ExploreLayout.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Header, Page, RoutedTabs } from '@backstage/core-components';\nimport {\n attachComponentData,\n useElementFilter,\n} from '@backstage/core-plugin-api';\nimport { TabProps } from '@material-ui/core/Tab';\nimport { default as React } from 'react';\n\n// TODO: This layout could be a shared based component if it was possible to create custom TabbedLayouts\n// A generalized version of createSubRoutesFromChildren, etc. would be required\n/** @public */\nexport type SubRoute = {\n path: string;\n title: string;\n children: JSX.Element;\n tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;\n};\n\nconst dataKey = 'plugin.explore.exploreLayoutRoute';\n\nconst Route: (props: SubRoute) => null = () => null;\nattachComponentData(Route, dataKey, true);\n\n// This causes all mount points that are discovered within this route to use the path of the route itself\nattachComponentData(Route, 'core.gatherMountPoints', true);\n\n/** @public */\nexport type ExploreLayoutProps = {\n title?: string;\n subtitle?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Explore is a compound component, which allows you to define a custom layout\n *\n * @example\n * ```jsx\n * <ExploreLayout title=\"Explore ACME's ecosystem\">\n * <ExploreLayout.Route path=\"/example\" title=\"Example tab\">\n * <div>This is rendered under /example/anything-here route</div>\n * </ExploreLayout.Route>\n * </ExploreLayout>\n * ```\n *\n * @public\n */\nexport const ExploreLayout = (props: ExploreLayoutProps) => {\n const { title, subtitle, children } = props;\n\n const routes = useElementFilter(children, elements =>\n elements\n .selectByComponentData({\n key: dataKey,\n withStrictError:\n 'Child of ExploreLayout must be an ExploreLayout.Route',\n })\n .getElements<SubRoute>()\n .map(child => child.props),\n );\n\n return (\n <Page themeId=\"home\">\n <Header\n title={title ?? 'Explore our ecosystem'}\n subtitle={subtitle ?? 'Discover solutions available in our ecosystem'}\n />\n <RoutedTabs routes={routes} />\n </Page>\n );\n};\n\nExploreLayout.Route = Route;\n"],"names":[],"mappings":";;;;AAkCA,MAAM,OAAA,GAAU,mCAAA;AAEhB,MAAM,QAAmC,MAAM,IAAA;AAC/C,mBAAA,CAAoB,KAAA,EAAO,SAAS,IAAI,CAAA;AAGxC,mBAAA,CAAoB,KAAA,EAAO,0BAA0B,IAAI,CAAA;AAuBlD,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA8B;AAC1D,EAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAU,QAAA,EAAS,GAAI,KAAA;AAEtC,EAAA,MAAM,MAAA,GAAS,gBAAA;AAAA,IAAiB,QAAA;AAAA,IAAU,CAAA,QAAA,KACxC,SACG,qBAAA,CAAsB;AAAA,MACrB,GAAA,EAAK,OAAA;AAAA,MACL,eAAA,EACE;AAAA,KACH,CAAA,CACA,WAAA,GACA,GAAA,CAAI,CAAA,KAAA,KAAS,MAAM,KAAK;AAAA,GAC7B;AAEA,EAAA,uBACE,IAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,MAAA,EACZ,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAO,KAAA,IAAS,uBAAA;AAAA,QAChB,UAAU,QAAA,IAAY;AAAA;AAAA,KACxB;AAAA,oBACA,GAAA,CAAC,cAAW,MAAA,EAAgB;AAAA,GAAA,EAC9B,CAAA;AAEJ;AAEA,aAAA,CAAc,KAAA,GAAQ,KAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExplorePage.esm.js","sources":["../../../src/components/ExplorePage/ExplorePage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useOutlet } from 'react-router-dom';\nimport { DefaultExplorePage } from '../DefaultExplorePage';\n\nexport const ExplorePage = () => {\n const outlet = useOutlet();\n\n return <>{outlet || <DefaultExplorePage />}</>;\n};\n"],"names":[],"mappings":";;;;AAmBO,MAAM,cAAc,MAAM;AAC/B,EAAA,MAAM,SAAS,SAAU,EAAA;AAEzB,EAAA,uBAAU,GAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA,MAAA,oBAAW,GAAA,CAAA,kBAAA,EAAA,EAAmB,CAAG,EAAA,CAAA;AAC7C;;;;"}
1
+ {"version":3,"file":"ExplorePage.esm.js","sources":["../../../src/components/ExplorePage/ExplorePage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useOutlet } from 'react-router-dom';\nimport { DefaultExplorePage } from '../DefaultExplorePage';\n\nexport const ExplorePage = () => {\n const outlet = useOutlet();\n\n return <>{outlet || <DefaultExplorePage />}</>;\n};\n"],"names":[],"mappings":";;;;AAmBO,MAAM,cAAc,MAAM;AAC/B,EAAA,MAAM,SAAS,SAAA,EAAU;AAEzB,EAAA,uBAAO,GAAA,CAAA,QAAA,EAAA,EAAG,QAAA,EAAA,MAAA,oBAAU,GAAA,CAAC,kBAAA,EAAA,EAAmB,CAAA,EAAG,CAAA;AAC7C;;;;"}
@@ -1,2 +1,6 @@
1
- export { ExplorePage } from './ExplorePage.esm.js';
1
+ import { ExplorePage } from './ExplorePage.esm.js';
2
+
3
+
4
+
5
+ export { ExplorePage };
2
6
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GroupsDiagram.esm.js","sources":["../../../src/components/GroupsExplorerContent/GroupsDiagram.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n parseEntityRef,\n RELATION_CHILD_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n DependencyGraph,\n DependencyGraphTypes,\n Link,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n entityRouteRef,\n getEntityRelations,\n EntityDisplayName,\n} from '@backstage/plugin-catalog-react';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport ZoomOutMap from '@material-ui/icons/ZoomOutMap';\nimport classNames from 'classnames';\nimport useAsync from 'react-use/esm/useAsync';\nimport { EntityFilterQuery } from '@backstage/catalog-client';\n\nconst useStyles = makeStyles(\n theme => ({\n graph: {\n minHeight: '100%',\n maxHeight: '1200px',\n flex: 1,\n },\n graphWrapper: {\n display: 'flex',\n height: '100%',\n },\n organizationNode: {\n fill: theme.palette.secondary.light,\n stroke: theme.palette.secondary.light,\n },\n groupNode: {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n centeredContent: {\n padding: theme.spacing(1),\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: theme.palette.common.black,\n },\n legend: {\n position: 'absolute',\n bottom: 0,\n right: 0,\n padding: theme.spacing(1),\n '& .icon': {\n verticalAlign: 'bottom',\n },\n },\n textOrganization: {\n color: theme.palette.secondary.contrastText,\n },\n textGroup: {\n color: theme.palette.primary.contrastText,\n },\n textWrapper: {\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textAlign: 'center',\n fontWeight: 'bold',\n fontSize: '20px',\n },\n }),\n {\n name: 'ExploreGroupsDiagram',\n },\n);\n\nfunction RenderNode(props: DependencyGraphTypes.RenderNodeProps<any>) {\n const nodeWidth = 180;\n const nodeHeight = 60;\n const theme = useTheme();\n const classes = useStyles();\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n\n if (props.node.id === 'root') {\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.organizationNode}\n />\n <title>{props.node.name}</title>\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div\n className={classNames(\n classes.textWrapper,\n classes.textOrganization,\n )}\n >\n {props.node.name}\n </div>\n </div>\n </foreignObject>\n </g>\n );\n }\n\n const ref = parseEntityRef(props.node.id);\n\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.groupNode}\n />\n <title>\n <EntityDisplayName entityRef={props.node.id} hideIcon disableTooltip />\n </title>\n\n <Link\n to={catalogEntityRoute({\n kind: ref.kind,\n namespace: ref.namespace,\n name: ref.name,\n })}\n >\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div className={classNames(classes.textWrapper, classes.textGroup)}>\n <EntityDisplayName entityRef={props.node.id} hideIcon />\n </div>\n </div>\n </foreignObject>\n </Link>\n </g>\n );\n}\n\n/**\n * Dynamically generates a diagram of groups registered in the catalog.\n */\nexport function GroupsDiagram(props: {\n direction?: DependencyGraphTypes.Direction;\n hideChildren?: boolean;\n namespace?: string;\n}) {\n const nodes = new Array<{\n id: string;\n kind: string;\n name: string;\n }>();\n const edges = new Array<{ from: string; to: string; label: string }>();\n\n const classes = useStyles();\n const configApi = useApi(configApiRef);\n const catalogApi = useApi(catalogApiRef);\n const organizationName =\n configApi.getOptionalString('organization.name') ?? 'Backstage';\n const {\n loading,\n error,\n value: catalogResponse,\n } = useAsync(() => {\n const filter: EntityFilterQuery = { kind: ['Group'] };\n if (props.namespace) {\n filter['metadata.namespace'] = props.namespace;\n }\n return catalogApi.getEntities({ filter });\n }, [catalogApi, props.namespace]);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n // the root of this diagram is the organization\n nodes.push({\n id: 'root',\n kind: 'Organization',\n name: organizationName,\n });\n\n for (const catalogItem of catalogResponse?.items || []) {\n const currentItemId = stringifyEntityRef(catalogItem);\n\n // Edge to parent\n const catalogItemRelations_childOf = getEntityRelations(\n catalogItem,\n RELATION_CHILD_OF,\n );\n\n if (props.hideChildren && catalogItemRelations_childOf.length) continue;\n\n nodes.push({\n id: stringifyEntityRef(catalogItem),\n kind: catalogItem.kind,\n name: '',\n });\n\n // if no parent is found, link the node to the root\n if (catalogItemRelations_childOf.length === 0) {\n edges.push({\n from: currentItemId,\n to: 'root',\n label: '',\n });\n }\n\n catalogItemRelations_childOf.forEach(relation => {\n edges.push({\n from: currentItemId,\n to: stringifyEntityRef(relation),\n label: '',\n });\n });\n }\n\n return (\n <div className={classes.graphWrapper}>\n <DependencyGraph\n nodes={nodes}\n edges={edges}\n nodeMargin={10}\n direction={props.direction || DependencyGraphTypes.Direction.RIGHT_LEFT}\n renderNode={RenderNode}\n className={classes.graph}\n fit=\"contain\"\n />\n\n <Typography\n variant=\"caption\"\n color=\"textSecondary\"\n display=\"block\"\n className={classes.legend}\n >\n <ZoomOutMap className=\"icon\" /> Use pinch &amp; zoom to move around the\n diagram.\n </Typography>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;AA0CA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA,MACL,SAAW,EAAA,MAAA;AAAA,MACX,SAAW,EAAA,QAAA;AAAA,MACX,IAAM,EAAA;AAAA,KACR;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,OAAS,EAAA,MAAA;AAAA,MACT,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,IAAA,EAAM,KAAM,CAAA,OAAA,CAAQ,SAAU,CAAA,KAAA;AAAA,MAC9B,MAAA,EAAQ,KAAM,CAAA,OAAA,CAAQ,SAAU,CAAA;AAAA,KAClC;AAAA,IACA,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,KAAM,CAAA,OAAA,CAAQ,OAAQ,CAAA,KAAA;AAAA,MAC5B,MAAA,EAAQ,KAAM,CAAA,OAAA,CAAQ,OAAQ,CAAA;AAAA,KAChC;AAAA,IACA,eAAiB,EAAA;AAAA,MACf,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,MACxB,MAAQ,EAAA,MAAA;AAAA,MACR,OAAS,EAAA,MAAA;AAAA,MACT,UAAY,EAAA,QAAA;AAAA,MACZ,cAAgB,EAAA,QAAA;AAAA,MAChB,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,MAAO,C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A,KACF,CAAA;AAAA;AAGH,EAAA,uBACG,IAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,YACtB,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,KAAA;AAAA,QACA,KAAA;AAAA,QACA,UAAY,EAAA,EAAA;AAAA,QACZ,SAAW,EAAA,KAAA,CAAM,SAAa,IAAA,oBAAA,CAAqB,SAAU,CAAA,UAAA;AAAA,QAC7D,UAAY,EAAA,UAAA;AAAA,QACZ,WAAW,OAAQ,CAAA,KAAA;AAAA,QACnB,GAAI,EAAA;AAAA;AAAA,KACN;AAAA,oBAEA,IAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAQ,EAAA,SAAA;AAAA,QACR,KAAM,EAAA,eAAA;AAAA,QACN,OAAQ,EAAA,OAAA;AAAA,QACR,WAAW,OAAQ,CAAA,MAAA;AAAA,QAEnB,QAAA,EAAA;AAAA,0BAAC,GAAA,CAAA,UAAA,EAAA,EAAW,WAAU,MAAO,EAAA,CAAA;AAAA,UAAE;AAAA;AAAA;AAAA;AAEjC,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GroupsDiagram.esm.js","sources":["../../../src/components/GroupsExplorerContent/GroupsDiagram.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n parseEntityRef,\n RELATION_CHILD_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n DependencyGraph,\n DependencyGraphTypes,\n Link,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n entityRouteRef,\n getEntityRelations,\n EntityDisplayName,\n} from '@backstage/plugin-catalog-react';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport ZoomOutMap from '@material-ui/icons/ZoomOutMap';\nimport classNames from 'classnames';\nimport useAsync from 'react-use/esm/useAsync';\nimport { EntityFilterQuery } from '@backstage/catalog-client';\n\nconst useStyles = makeStyles(\n theme => ({\n graph: {\n minHeight: '100%',\n maxHeight: '1200px',\n flex: 1,\n },\n graphWrapper: {\n display: 'flex',\n height: '100%',\n },\n organizationNode: {\n fill: theme.palette.secondary.light,\n stroke: theme.palette.secondary.light,\n },\n groupNode: {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n centeredContent: {\n padding: theme.spacing(1),\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: theme.palette.common.black,\n },\n legend: {\n position: 'absolute',\n bottom: 0,\n right: 0,\n padding: theme.spacing(1),\n '& .icon': {\n verticalAlign: 'bottom',\n },\n },\n textOrganization: {\n color: theme.palette.secondary.contrastText,\n },\n textGroup: {\n color: theme.palette.primary.contrastText,\n },\n textWrapper: {\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textAlign: 'center',\n fontWeight: 'bold',\n fontSize: '20px',\n },\n }),\n {\n name: 'ExploreGroupsDiagram',\n },\n);\n\nfunction RenderNode(props: DependencyGraphTypes.RenderNodeProps<any>) {\n const nodeWidth = 180;\n const nodeHeight = 60;\n const theme = useTheme();\n const classes = useStyles();\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n\n if (props.node.id === 'root') {\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.organizationNode}\n />\n <title>{props.node.name}</title>\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div\n className={classNames(\n classes.textWrapper,\n classes.textOrganization,\n )}\n >\n {props.node.name}\n </div>\n </div>\n </foreignObject>\n </g>\n );\n }\n\n const ref = parseEntityRef(props.node.id);\n\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.groupNode}\n />\n <title>\n <EntityDisplayName entityRef={props.node.id} hideIcon disableTooltip />\n </title>\n\n <Link\n to={catalogEntityRoute({\n kind: ref.kind,\n namespace: ref.namespace,\n name: ref.name,\n })}\n >\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div className={classNames(classes.textWrapper, classes.textGroup)}>\n <EntityDisplayName entityRef={props.node.id} hideIcon />\n </div>\n </div>\n </foreignObject>\n </Link>\n </g>\n );\n}\n\n/**\n * Dynamically generates a diagram of groups registered in the catalog.\n */\nexport function GroupsDiagram(props: {\n direction?: DependencyGraphTypes.Direction;\n hideChildren?: boolean;\n namespace?: string;\n}) {\n const nodes = new Array<{\n id: string;\n kind: string;\n name: string;\n }>();\n const edges = new Array<{ from: string; to: string; label: string }>();\n\n const classes = useStyles();\n const configApi = useApi(configApiRef);\n const catalogApi = useApi(catalogApiRef);\n const organizationName =\n configApi.getOptionalString('organization.name') ?? 'Backstage';\n const {\n loading,\n error,\n value: catalogResponse,\n } = useAsync(() => {\n const filter: EntityFilterQuery = { kind: ['Group'] };\n if (props.namespace) {\n filter['metadata.namespace'] = props.namespace;\n }\n return catalogApi.getEntities({ filter });\n }, [catalogApi, props.namespace]);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n // the root of this diagram is the organization\n nodes.push({\n id: 'root',\n kind: 'Organization',\n name: organizationName,\n });\n\n for (const catalogItem of catalogResponse?.items || []) {\n const currentItemId = stringifyEntityRef(catalogItem);\n\n // Edge to parent\n const catalogItemRelations_childOf = getEntityRelations(\n catalogItem,\n RELATION_CHILD_OF,\n );\n\n if (props.hideChildren && catalogItemRelations_childOf.length) continue;\n\n nodes.push({\n id: stringifyEntityRef(catalogItem),\n kind: catalogItem.kind,\n name: '',\n });\n\n // if no parent is found, link the node to the root\n if (catalogItemRelations_childOf.length === 0) {\n edges.push({\n from: currentItemId,\n to: 'root',\n label: '',\n });\n }\n\n catalogItemRelations_childOf.forEach(relation => {\n edges.push({\n from: currentItemId,\n to: stringifyEntityRef(relation),\n label: '',\n });\n });\n }\n\n return (\n <div className={classes.graphWrapper}>\n <DependencyGraph\n nodes={nodes}\n edges={edges}\n nodeMargin={10}\n direction={props.direction || DependencyGraphTypes.Direction.RIGHT_LEFT}\n renderNode={RenderNode}\n className={classes.graph}\n fit=\"contain\"\n />\n\n <Typography\n variant=\"caption\"\n color=\"textSecondary\"\n display=\"block\"\n className={classes.legend}\n >\n <ZoomOutMap className=\"icon\" /> Use pinch &amp; zoom to move around the\n diagram.\n </Typography>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;AA0CA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB,CAAA,KAAA,MAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,QAAA;AAAA,MACX,IAAA,EAAM;AAAA,KACR;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,OAAA,EAAS,MAAA;AAAA,MACT,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,SAAA,CAAU,KAAA;AAAA,MAC9B,MAAA,EAAQ,KAAA,CAAM,OAAA,CAAQ,SAAA,CAAU;AAAA,KAClC;AAAA,IACA,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,KAAA,CAAM,OAAA,CAAQ,OAAA,CAAQ,KAAA;AAAA,MAC5B,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*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GroupsDiagram } from './GroupsDiagram';\nimport {\n Content,\n ContentHeader,\n DependencyGraphTypes,\n SupportButton,\n} from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n {\n root: {\n height: '100%',\n maxHeight: '100%',\n minHeight: 0,\n },\n },\n { name: 'ExploreGroupsContent' },\n);\n\nexport const GroupsExplorerContent = (props: {\n title?: string;\n direction?: DependencyGraphTypes.Direction;\n hideChildren?: boolean;\n namespace?: string;\n}) => {\n const classes = useStyles();\n\n return (\n <Content noPadding stretch className={classes.root}>\n <ContentHeader title={props.title ?? 'Groups'}>\n <SupportButton>Explore your groups.</SupportButton>\n </ContentHeader>\n <GroupsDiagram\n direction={props.direction}\n hideChildren={props.hideChildren}\n namespace={props.namespace}\n />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;AAyBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,MAAQ,EAAA,MAAA;AAAA,MACR,SAAW,EAAA,MAAA;AAAA,MACX,SAAW,EAAA;AAAA;AACb,GACF;AAAA,EACA,EAAE,MAAM,sBAAuB;AACjC,CAAA;AAEa,MAAA,qBAAA,GAAwB,CAAC,KAKhC,KAAA;AACJ,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EACE,uBAAA,IAAA,CAAC,WAAQ,SAAS,EAAA,IAAA,EAAC,SAAO,IAAC,EAAA,SAAA,EAAW,QAAQ,IAC5C,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,aAAA,EAAA,EAAc,OAAO,KAAM,CAAA,KAAA,IAAS,UACnC,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,kCAAoB,CACrC,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,WAAW,KAAM,CAAA,SAAA;AAAA,QACjB,cAAc,KAAM,CAAA,YAAA;AAAA,QACpB,WAAW,KAAM,CAAA;AAAA;AAAA;AACnB,GACF,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GroupsExplorerContent.esm.js","sources":["../../../src/components/GroupsExplorerContent/GroupsExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GroupsDiagram } from './GroupsDiagram';\nimport {\n Content,\n ContentHeader,\n DependencyGraphTypes,\n SupportButton,\n} from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n {\n root: {\n height: '100%',\n maxHeight: '100%',\n minHeight: 0,\n },\n },\n { name: 'ExploreGroupsContent' },\n);\n\nexport const GroupsExplorerContent = (props: {\n title?: string;\n direction?: DependencyGraphTypes.Direction;\n hideChildren?: boolean;\n namespace?: string;\n}) => {\n const classes = useStyles();\n\n return (\n <Content noPadding stretch className={classes.root}>\n <ContentHeader title={props.title ?? 'Groups'}>\n <SupportButton>Explore your groups.</SupportButton>\n </ContentHeader>\n <GroupsDiagram\n direction={props.direction}\n hideChildren={props.hideChildren}\n namespace={props.namespace}\n />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;AAyBA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB;AAAA,IACE,IAAA,EAAM;AAAA,MACJ,MAAA,EAAQ,MAAA;AAAA,MACR,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW;AAAA;AACb,GACF;AAAA,EACA,EAAE,MAAM,sBAAA;AACV,CAAA;AAEO,MAAM,qBAAA,GAAwB,CAAC,KAAA,KAKhC;AACJ,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,uBACE,IAAA,CAAC,WAAQ,SAAA,EAAS,IAAA,EAAC,SAAO,IAAA,EAAC,SAAA,EAAW,QAAQ,IAAA,EAC5C,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,OAAO,KAAA,CAAM,KAAA,IAAS,UACnC,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,kCAAoB,CAAA,EACrC,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,WAAW,KAAA,CAAM,SAAA;AAAA,QACjB,cAAc,KAAA,CAAM,YAAA;AAAA,QACpB,WAAW,KAAA,CAAM;AAAA;AAAA;AACnB,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1,2 +1,6 @@
1
- export { GroupsExplorerContent } from './GroupsExplorerContent.esm.js';
1
+ import { GroupsExplorerContent } from './GroupsExplorerContent.esm.js';
2
+
3
+
4
+
5
+ export { GroupsExplorerContent };
2
6
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolCard.esm.js","sources":["../../../src/components/ToolCard/ToolCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExploreTool } from '@backstage-community/plugin-explore-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport { LinkButton } from '@backstage/core-components';\nimport classNames from 'classnames';\n\n// TODO: Align styling between Domain and ToolCard\n\nconst useStyles = makeStyles<Theme>(\n theme => ({\n media: {\n height: 128,\n },\n mediaContain: {\n backgroundSize: 'contain',\n },\n lifecycle: {\n lineHeight: '0.8em',\n color: theme.palette.common.white,\n },\n ga: {\n backgroundColor: theme.palette.status.ok,\n },\n alpha: {\n backgroundColor: theme.palette.status.error,\n },\n beta: {\n backgroundColor: theme.palette.status.warning,\n },\n }),\n {\n name: 'ExploreToolCard',\n },\n);\n\ntype Props = {\n card: ExploreTool;\n objectFit?: 'cover' | 'contain';\n};\n\nexport const ToolCard = ({ card, objectFit }: Props) => {\n const classes = useStyles();\n\n const { title, description, url, image, lifecycle, tags } = card;\n\n return (\n <Card key={title}>\n <CardMedia\n image={image}\n title={title}\n className={classNames(classes.media, {\n [classes.mediaContain]: objectFit === 'contain',\n })}\n />\n <CardContent>\n <Typography variant=\"h5\">\n {title}{' '}\n {lifecycle && lifecycle.toLocaleLowerCase('en-US') !== 'ga' && (\n <Chip\n size=\"small\"\n label={lifecycle}\n className={classNames(\n classes.lifecycle,\n classes[lifecycle.toLocaleLowerCase('en-US')],\n )}\n />\n )}\n </Typography>\n <Typography>{description || 'Description missing'}</Typography>\n {tags && (\n <Box marginTop={2}>\n {tags.map((item, idx) => (\n <Chip size=\"small\" key={idx} label={item} />\n ))}\n </Box>\n )}\n </CardContent>\n <CardActions>\n <LinkButton color=\"primary\" to={url} disabled={!url}>\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA,MACL,MAAQ,EAAA;AAAA,KACV;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,cAAgB,EAAA;AAAA,KAClB;AAAA,IACA,SAAW,EAAA;AAAA,MACT,UAAY,EAAA,OAAA;AAAA,MACZ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA,KAC9B;AAAA,IACA,EAAI,EAAA;AAAA,MACF,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA,KACxC;AAAA,IACA,KAAO,EAAA;AAAA,MACL,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA,KACxC;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA;AACxC,GACF,CAAA;AAAA,EACA;AAAA,IACE,IAAM,EAAA;AAAA;AAEV,CAAA;AAOO,MAAM,QAAW,GAAA,CAAC,EAAE,IAAA,EAAM,WAAuB,KAAA;AACtD,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EAAA,MAAM,EAAE,KAAO,EAAA,WAAA,EAAa,KAAK,KAAO,EAAA,SAAA,EAAW,MAAS,GAAA,IAAA;AAE5D,EAAA,4BACG,IACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,KAAA;AAAA,Q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"file":"ToolCard.esm.js","sources":["../../../src/components/ToolCard/ToolCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExploreTool } from '@backstage-community/plugin-explore-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport { LinkButton } from '@backstage/core-components';\nimport classNames from 'classnames';\n\n// TODO: Align styling between Domain and ToolCard\n\nconst useStyles = makeStyles<Theme>(\n theme => ({\n media: {\n height: 128,\n },\n mediaContain: {\n backgroundSize: 'contain',\n },\n lifecycle: {\n lineHeight: '0.8em',\n color: theme.palette.common.white,\n },\n ga: {\n backgroundColor: theme.palette.status.ok,\n },\n alpha: {\n backgroundColor: theme.palette.status.error,\n },\n beta: {\n backgroundColor: theme.palette.status.warning,\n },\n }),\n {\n name: 'ExploreToolCard',\n },\n);\n\ntype Props = {\n card: ExploreTool;\n objectFit?: 'cover' | 'contain';\n};\n\nexport const ToolCard = ({ card, objectFit }: Props) => {\n const classes = useStyles();\n\n const { title, description, url, image, lifecycle, tags } = card;\n\n return (\n <Card key={title}>\n <CardMedia\n image={image}\n title={title}\n className={classNames(classes.media, {\n [classes.mediaContain]: objectFit === 'contain',\n })}\n />\n <CardContent>\n <Typography variant=\"h5\">\n {title}{' '}\n {lifecycle && lifecycle.toLocaleLowerCase('en-US') !== 'ga' && (\n <Chip\n size=\"small\"\n label={lifecycle}\n className={classNames(\n classes.lifecycle,\n classes[lifecycle.toLocaleLowerCase('en-US')],\n )}\n />\n )}\n </Typography>\n <Typography>{description || 'Description missing'}</Typography>\n {tags && (\n <Box marginTop={2}>\n {tags.map((item, idx) => (\n <Chip size=\"small\" key={idx} label={item} />\n ))}\n </Box>\n )}\n </CardContent>\n <CardActions>\n <LinkButton color=\"primary\" to={url} disabled={!url}>\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA8BA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB,CAAA,KAAA,MAAU;AAAA,IACR,KAAA,EAAO;AAAA,MACL,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,cAAA,EAAgB;AAAA,KAClB;AAAA,IACA,SAAA,EAAW;AAAA,MACT,UAAA,EAAY,OAAA;AAAA,MACZ,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO;AAAA,KAC9B;AAAA,IACA,EAAA,EAAI;AAAA,MACF,eAAA,EAAiB,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO;AAAA,KACxC;AAAA,IACA,KAAA,EAAO;AAAA,MACL,eAAA,EAAiB,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO;AAAA,KACxC;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,eAAA,EAAiB,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO;AAAA;AACxC,GACF,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV,CAAA;AAOO,MAAM,QAAA,GAAW,CAAC,EAAE,IAAA,EAAM,WAAU,KAAa;AACtD,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,MAAM,EAAE,KAAA,EAAO,WAAA,EAAa,KAAK,KAAA,EAAO,SAAA,EAAW,MAAK,GAAI,IAAA;AAE5D,EA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GAAA,EAAK,QAAA,EAAA,SAAA,EAErD,CAAA,EACF;AAAA,GAAA,EAAA,EAnCS,KAoCX,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolExplorerContent.esm.js","sources":["../../../src/components/ToolExplorerContent/ToolExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport useAsync from 'react-use/esm/useAsync';\nimport { ToolCard } from '../ToolCard';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { exploreApiRef } from '../../api';\n\nconst Body = () => {\n const exploreApi = useApi(exploreApiRef);\n\n const {\n value: tools,\n loading,\n error,\n } = useAsync(async () => {\n return (await exploreApi.getTools())?.tools;\n }, [exploreApi]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return <WarningPanel title=\"Failed to load tools\" />;\n }\n\n if (!tools?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title=\"No tools to display\"\n description=\"You haven't added any tools yet.\"\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {tools.map((tool, index) => (\n <ToolCard key={index} card={tool} />\n ))}\n </ItemCardGrid>\n );\n};\n\nexport const ToolExplorerContent = (props: { title?: string }) => (\n <Content noPadding>\n <ContentHeader title={props.title ?? 'Tools'}>\n <SupportButton>Discover the tools in your ecosystem.</SupportButton>\n </ContentHeader>\n <Body />\n </Content>\n);\n"],"names":[],"mappings":";;;;;;;;AA8BA,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erContent.esm.js","sources":["../../../src/components/ToolExplorerContent/ToolExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport useAsync from 'react-use/esm/useAsync';\nimport { ToolCard } from '../ToolCard';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { exploreApiRef } from '../../api';\n\nconst Body = () => {\n const exploreApi = useApi(exploreApiRef);\n\n const {\n value: tools,\n loading,\n error,\n } = useAsync(async () => {\n return (await exploreApi.getTools())?.tools;\n }, [exploreApi]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return <WarningPanel title=\"Failed to load tools\" />;\n }\n\n if (!tools?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title=\"No tools to display\"\n description=\"You haven't added any tools yet.\"\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {tools.map((tool, index) => (\n <ToolCard key={index} card={tool} />\n ))}\n </ItemCardGrid>\n );\n};\n\nexport const ToolExplorerContent = (props: { title?: string }) => (\n <Content noPadding>\n <ContentHeader title={props.title ?? 'Tools'}>\n <SupportButton>Discover the tools in your ecosystem.</SupportButton>\n </ContentHeader>\n <Body />\n </Content>\n);\n"],"names":[],"mappings":";;;;;;;;AA8BA,MAAM,OAAO,MAAM;AACjB,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AAEvC,EAAA,MAAM;AAAA,IACJ,KAAA,EAAO,KAAA;AAAA,IACP,OAAA;AAAA,IACA;AAAA,GACF,GAAI,SAAS,YAAY;AACvB,IAAA,OAAA,CAAQ,MAAM,UAAA,CAAW,QAAA,EAAS,GAAI,KAAA;AAAA,EACxC,CAAA,EAAG,CAAC,UAAU,CAAC,CAAA;AAEf,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB;AAEA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAa,KAAA,EAAM,sBAAA,EAAuB,CAAA;AAAA,EACpD;AAEA,EAAA,IAAI,CAAC,OAAO,MAAA,EAAQ;AAClB,IAAA,uBACE,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,MAAA;AAAA,QACR,KAAA,EAAM,qBAAA;AAAA,QACN,WAAA,EAAY;AAAA;AAAA,KACd;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,YAAA,EAAA,EACE,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,qBAChB,GAAA,CAAC,QAAA,EAAA,EAAqB,IAAA,EAAM,IAAA,EAAA,EAAb,KAAmB,CACnC,CAAA,EACH,CAAA;AAEJ,CAAA;AAEO,MAAM,sBAAsB,CAAC,KAAA,qBAClC,IAAA,CAAC,OAAA,EAAA,EAAQ,WAAS,IAAA,EAChB,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,OAAO,KAAA,CAAM,KAAA,IAAS,SACnC,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,mDAAqC,CAAA,EACtD,CAAA;AAAA,sBACC,IAAA,EAAA,EAAK;AAAA,CAAA,EACR;;;;"}
@@ -1,2 +1,6 @@
1
- export { ToolExplorerContent } from './ToolExplorerContent.esm.js';
1
+ import { ToolExplorerContent } from './ToolExplorerContent.esm.js';
2
+
3
+
4
+
5
+ export { ToolExplorerContent };
2
6
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolSearchResultListItem.esm.js","sources":["../../../src/components/ToolSearchResultListItem/ToolSearchResultListItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ReactNode } from 'react';\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Link } from '@backstage/core-components';\nimport {\n IndexableDocument,\n ResultHighlight,\n} from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\n\nconst useStyles = makeStyles(\n {\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n wordBreak: 'break-all',\n marginBottom: '1rem',\n },\n },\n { name: 'ExploreToolSearchResultListItem' },\n);\n\n/**\n * Props for {@link ToolSearchResultListItem}.\n *\n * @public\n */\nexport interface ToolSearchResultListItemProps {\n icon?: ReactNode | ((result: IndexableDocument) => ReactNode);\n result?: IndexableDocument;\n highlight?: ResultHighlight;\n rank?: number;\n}\n\n/** @public */\nexport function ToolSearchResultListItem(props: ToolSearchResultListItemProps) {\n const result = props.result as any;\n\n const classes = useStyles();\n\n if (!result) return null;\n\n return (\n <>\n {props.icon && (\n <ListItemIcon>\n {typeof props.icon === 'function' ? props.icon(result) : props.icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <Link noTrack to={result.location}>\n {props.highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={props.highlight.fields.title}\n preTag={props.highlight.preTag}\n postTag={props.highlight.postTag}\n />\n ) : (\n result.title\n )}\n </Link>\n }\n secondary={\n props.highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={props.highlight.fields.text}\n preTag={props.highlight.preTag}\n postTag={props.highlight.postTag}\n />\n ) : (\n result.text\n )\n }\n />\n <Box>\n {result.tags?.map((tag: string) => (\n <Chip label={tag} size=\"small\" />\n ))}\n </Box>\n </div>\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AA6BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,aAAe,EAAA;AAAA,MACb,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,QAAU,EAAA;AAAA,MACR,KAAO,EAAA,MAAA;AAAA,MACP,SAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA;AAAA;AAChB,GACF;AAAA,EACA,EAAE,MAAM,iCAAkC;AAC5C,CAAA;AAeO,SAAS,yBAAyB,KAAsC,EAAA;AAC7E,EAAA,MAAM,SAAS,KAAM,CAAA,MAAA;AAErB,EAAA,MAAM,UAAU,SAAU,EAAA;AAE1B,EAAI,IAAA,CAAC,QAAe,OAAA,IAAA;AAEpB,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IAAA,KAAA,CAAM,IACL,oBAAA,GAAA,CAAC,YACE,EAAA,EAAA,QAAA,EAAA,OAAO,KAAM,CAAA,IAAA,KAAS,UAAa,GAAA,KAAA,CAAM,IAAK,CAAA,MAAM,CAAI,GAAA,KAAA,CAAM,IACjE,EAAA,CAAA;AAAA,oBAED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SearchResultListItem.esm.js","sources":["../../../src/components/ToolSearchResultListItem/ToolSearchResultListItem.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ReactNode } from 'react';\nimport Box from '@material-ui/core/Box';\nimport Chip from '@material-ui/core/Chip';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Link } from '@backstage/core-components';\nimport {\n IndexableDocument,\n ResultHighlight,\n} from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\n\nconst useStyles = makeStyles(\n {\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n wordBreak: 'break-all',\n marginBottom: '1rem',\n },\n },\n { name: 'ExploreToolSearchResultListItem' },\n);\n\n/**\n * Props for {@link ToolSearchResultListItem}.\n *\n * @public\n */\nexport interface ToolSearchResultListItemProps {\n icon?: ReactNode | ((result: IndexableDocument) => ReactNode);\n result?: IndexableDocument;\n highlight?: ResultHighlight;\n rank?: number;\n}\n\n/** @public */\nexport function ToolSearchResultListItem(props: ToolSearchResultListItemProps) {\n const result = props.result as any;\n\n const classes = useStyles();\n\n if (!result) return null;\n\n return (\n <>\n {props.icon && (\n <ListItemIcon>\n {typeof props.icon === 'function' ? props.icon(result) : props.icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <Link noTrack to={result.location}>\n {props.highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={props.highlight.fields.title}\n preTag={props.highlight.preTag}\n postTag={props.highlight.postTag}\n />\n ) : (\n result.title\n )}\n </Link>\n }\n secondary={\n props.highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={props.highlight.fields.text}\n preTag={props.highlight.preTag}\n postTag={props.highlight.postTag}\n />\n ) : (\n result.text\n )\n }\n />\n <Box>\n {result.tags?.map((tag: string) => (\n <Chip label={tag} size=\"small\" />\n ))}\n </Box>\n </div>\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AA6BA,MAAM,SAAA,GAAY,UAAA;AAAA,EAChB;AAAA,IACE,aAAA,EAAe;AAAA,MACb,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,QAAA,EAAU;AAAA,MACR,KAAA,EAAO,MAAA;AAAA,MACP,SAAA,EAAW,WAAA;AAAA,MACX,YAAA,EAAc;AAAA;AAChB,GACF;AAAA,EACA,EAAE,MAAM,iCAAA;AACV,CAAA;AAeO,SAAS,yBAAyB,KAAA,EAAsC;AAC7E,EAAA,MAAM,SAAS,KAAA,CAAM,MAAA;AAErB,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,IAAI,CAAC,QAAQ,OAAO,IAAA;AAEpB,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,KAAA,CAAM,IAAA,oBACL,GAAA,CAAC,YAAA,EAAA,EACE,QAAA,EAAA,OAAO,KAAA,CAAM,IAAA,KAAS,UAAA,GAAa,KAAA,CAAM,IAAA,CAAK,MAAM,CAAA,GAAI,KAAA,CAAM,IAAA,EACjE,CAAA;AAAA,oBAEF,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,aAAA,EACtB,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,YAAA;AAAA,QAAA;AAAA,UACC,WAAW,OAAA,CAAQ,QAAA;AAAA,UACnB,sBAAA,EAAwB,EAAE,OAAA,EAAS,IAAA,EAAK;AAAA,UACxC,OAAA,kBACE,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAO,IAAA,EAAC,EAAA,EAAI,MAAA,CAAO,QAAA,EACtB,QAAA,EAAA,KAAA,CAAM,SAAA,EAAW,MAAA,CAAO,KAAA,mBACvB,GAAA;AAAA,YAAC,2BAAA;AAAA,YAAA;AAAA,cACC,IAAA,EAAM,KAAA,CAAM,SAAA,CAAU,MAAA,CAAO,KAAA;AAAA,cAC7B,MAAA,EAAQ,MAAM,SAAA,CAAU,MAAA;AAAA,cACxB,OAAA,EAAS,MAAM,SAAA,CAAU;AAAA;AAAA,WAC3B,GAEA,OAAO,KAAA,EAEX,CAAA;AAAA,UAEF,SAAA,EACE,KAAA,CAAM,SAAA,EAAW,MAAA,CAAO,IAAA,mBACtB,GAAA;AAAA,YAAC,2BAAA;AAAA,YAAA;AAAA,cACC,IAAA,EAAM,KAAA,CAAM,SAAA,CAAU,MAAA,CAAO,IAAA;AAAA,cAC7B,MAAA,EAAQ,MAAM,SAAA,CAAU,MAAA;AAAA,cACxB,OAAA,EAAS,MAAM,SAAA,CAAU;AAAA;AAAA,cAG3B,MAAA,CAAO;AAAA;AAAA,OAGb;AAAA,sBACA,GAAA,CAAC,GAAA,EAAA,EACE,QAAA,EAAA,MAAA,CAAO,IAAA,EAAM,IAAI,CAAC,GAAA,qBACjB,GAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAO,GAAA,EAAK,IAAA,EAAK,OAAA,EAAQ,CAChC,CAAA,EACH;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
@@ -1,2 +1,6 @@
1
- export { ToolSearchResultListItem } from './ToolSearchResultListItem.esm.js';
1
+ import { ToolSearchResultListItem } from './ToolSearchResultListItem.esm.js';
2
+
3
+
4
+
5
+ export { ToolSearchResultListItem };
2
6
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"extensions.esm.js","sources":["../src/extensions.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { explorePlugin } from './plugin';\nimport { exploreRouteRef } from './routes';\nimport {\n createComponentExtension,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const ExplorePage = explorePlugin.provide(\n createRoutableExtension({\n name: 'ExplorePage',\n component: () =>\n import('./components/ExplorePage').then(m => m.ExplorePage),\n mountPoint: exploreRouteRef,\n }),\n);\n\n/** @public */\nexport const DomainExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'DomainExplorerContent',\n component: {\n lazy: () =>\n import('./components/DomainExplorerContent').then(\n m => m.DomainExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const GroupsExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'GroupsExplorerContent',\n component: {\n lazy: () =>\n import('./components/GroupsExplorerContent').then(\n m => m.GroupsExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const ToolExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'ToolExplorerContent',\n component: {\n lazy: () =>\n import('./components/ToolExplorerContent').then(\n m => m.ToolExplorerContent,\n ),\n },\n }),\n);\n"],"names":[],"mappings":";;;;AAwBO,MAAM,cAAc,aAAc,CAAA,OAAA;AAAA,EACvC,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,aAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,uCAA0B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,WAAW,CAAA;AAAA,IAC5D,UAAY,EAAA;AAAA,GACb;AACH;AAGO,MAAM,wBAAwB,aAAc,CAAA,OAAA;AAAA,EACjD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,uBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,iDAAoC,CAAE,CAAA,IAAA;AAAA,QAC3C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAGO,MAAM,wBAAwB,aAAc,CAAA,OAAA;AAAA,EACjD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,uBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,iDAAoC,CAAE,CAAA,IAAA;AAAA,QAC3C,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;AAGO,MAAM,sBAAsB,aAAc,CAAA,OAAA;AAAA,EAC/C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,qBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,+CAAkC,CAAE,CAAA,IAAA;AAAA,QACzC,OAAK,CAAE,CAAA;AAAA;AACT;AACJ,GACD;AACH;;;;"}
1
+ {"version":3,"file":"extensions.esm.js","sources":["../src/extensions.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { explorePlugin } from './plugin';\nimport { exploreRouteRef } from './routes';\nimport {\n createComponentExtension,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const ExplorePage = explorePlugin.provide(\n createRoutableExtension({\n name: 'ExplorePage',\n component: () =>\n import('./components/ExplorePage').then(m => m.ExplorePage),\n mountPoint: exploreRouteRef,\n }),\n);\n\n/** @public */\nexport const DomainExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'DomainExplorerContent',\n component: {\n lazy: () =>\n import('./components/DomainExplorerContent').then(\n m => m.DomainExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const GroupsExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'GroupsExplorerContent',\n component: {\n lazy: () =>\n import('./components/GroupsExplorerContent').then(\n m => m.GroupsExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const ToolExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'ToolExplorerContent',\n component: {\n lazy: () =>\n import('./components/ToolExplorerContent').then(\n m => m.ToolExplorerContent,\n ),\n },\n }),\n);\n"],"names":[],"mappings":";;;;AAwBO,MAAM,cAAc,aAAA,CAAc,OAAA;AAAA,EACvC,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,aAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,uCAA0B,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,WAAW,CAAA;AAAA,IAC5D,UAAA,EAAY;AAAA,GACb;AACH;AAGO,MAAM,wBAAwB,aAAA,CAAc,OAAA;AAAA,EACjD,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,uBAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,iDAAoC,CAAA,CAAE,IAAA;AAAA,QAC3C,OAAK,CAAA,CAAE;AAAA;AACT;AACJ,GACD;AACH;AAGO,MAAM,wBAAwB,aAAA,CAAc,OAAA;AAAA,EACjD,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,uBAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,iDAAoC,CAAA,CAAE,IAAA;AAAA,QAC3C,OAAK,CAAA,CAAE;AAAA;AACT;AACJ,GACD;AACH;AAGO,MAAM,sBAAsB,aAAA,CAAc,OAAA;AAAA,EAC/C,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,qBAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,+CAAkC,CAAA,CAAE,IAAA;AAAA,QACzC,OAAK,CAAA,CAAE;AAAA;AACT;AACJ,GACD;AACH;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
2
  import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';
4
3
  import { GetExploreToolsRequest, GetExploreToolsResponse } from '@backstage-community/plugin-explore-common';
@@ -6,7 +5,7 @@ import { ExploreToolsConfig } from '@backstage-community/plugin-explore-react';
6
5
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
7
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
7
  import { TabProps } from '@material-ui/core/Tab';
9
- import React__default, { ReactNode } from 'react';
8
+ import react__default, { ReactNode } from 'react';
10
9
  import { DomainEntity } from '@backstage/catalog-model';
11
10
  import * as _backstage_core_components from '@backstage/core-components';
12
11
  import { SearchResultListItemExtensionProps } from '@backstage/plugin-search-react';
@@ -64,15 +63,15 @@ type SubRoute = {
64
63
  path: string;
65
64
  title: string;
66
65
  children: JSX.Element;
67
- tabProps?: TabProps<React__default.ElementType, {
68
- component?: React__default.ElementType;
66
+ tabProps?: TabProps<react__default.ElementType, {
67
+ component?: react__default.ElementType;
69
68
  }>;
70
69
  };
71
70
  /** @public */
72
71
  type ExploreLayoutProps = {
73
72
  title?: string;
74
73
  subtitle?: string;
75
- children?: React__default.ReactNode;
74
+ children?: react__default.ReactNode;
76
75
  };
77
76
  /**
78
77
  * Explore is a compound component, which allows you to define a custom layout
@@ -102,18 +101,18 @@ declare const DomainCard: (props: {
102
101
  declare const ExplorePage: () => react_jsx_runtime.JSX.Element;
103
102
  /** @public */
104
103
  declare const DomainExplorerContent: (props: {
105
- title?: string | undefined;
104
+ title?: string;
106
105
  }) => react_jsx_runtime.JSX.Element;
107
106
  /** @public */
108
107
  declare const GroupsExplorerContent: (props: {
109
- title?: string | undefined;
110
- direction?: _backstage_core_components.DependencyGraphTypes.Direction | undefined;
111
- hideChildren?: boolean | undefined;
112
- namespace?: string | undefined;
108
+ title?: string;
109
+ direction?: _backstage_core_components.DependencyGraphTypes.Direction;
110
+ hideChildren?: boolean;
111
+ namespace?: string;
113
112
  }) => react_jsx_runtime.JSX.Element;
114
113
  /** @public */
115
114
  declare const ToolExplorerContent: (props: {
116
- title?: string | undefined;
115
+ title?: string;
117
116
  }) => react_jsx_runtime.JSX.Element;
118
117
 
119
118
  /**
@@ -1,6 +1,6 @@
1
1
  import { exploreToolsConfigRef } from '@backstage-community/plugin-explore-react';
2
- import { exploreRouteRef, catalogEntityRouteRef } from './routes.esm.js';
3
- import { createPlugin, createApiFactory, discoveryApiRef, fetchApiRef } from '@backstage/core-plugin-api';
2
+ import { catalogEntityRouteRef, exploreRouteRef } from './routes.esm.js';
3
+ import { createPlugin, createApiFactory, fetchApiRef, discoveryApiRef } from '@backstage/core-plugin-api';
4
4
  import { createSearchResultListItemExtension } from '@backstage/plugin-search-react';
5
5
  import { ExploreClient } from './api/ExploreClient.esm.js';
6
6
  import { exploreApiRef } from './api/ExploreApi.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { exploreToolsConfigRef } from '@backstage-community/plugin-explore-react';\nimport { catalogEntityRouteRef, exploreRouteRef } from './routes';\nimport {\n createApiFactory,\n createPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { ExploreClient, exploreApiRef } from './api';\nimport { ToolSearchResultListItemProps } from './components/ToolSearchResultListItem';\n// import { exampleTools } from './util/examples';\n\n/** @public */\nexport const explorePlugin = createPlugin({\n id: 'explore',\n apis: [\n createApiFactory({\n api: exploreApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n exploreToolsConfig: exploreToolsConfigRef,\n },\n factory: ({ discoveryApi, fetchApi, exploreToolsConfig }) =>\n // NOTE: The exploreToolsConfig is for backwards compatibility and will be removed in the future\n new ExploreClient({ discoveryApi, fetchApi, exploreToolsConfig }),\n }),\n /**\n * @deprecated Use ExploreApi from `@backstage-community/plugin-explore` instead\n *\n * Register a default for exploreToolsConfigRef, you may want to override\n * the API locally in your app.\n */\n createApiFactory({\n api: exploreToolsConfigRef,\n deps: {},\n factory: () => ({\n async getTools() {\n // Returning `undefined` will enable the explore-backend to be used via the ExploreClient.\n // If this API has been customized and returns data it will be respected first.\n return undefined as any;\n },\n }),\n }),\n ],\n routes: {\n explore: exploreRouteRef,\n },\n externalRoutes: {\n catalogEntity: catalogEntityRouteRef,\n },\n});\n\n/** @public */\nexport const ToolSearchResultListItem: (\n props: SearchResultListItemExtensionProps<ToolSearchResultListItemProps>,\n) => JSX.Element | null = explorePlugin.provide(\n createSearchResultListItemExtension({\n name: 'ToolSearchResultListItem',\n component: () =>\n import('./components/ToolSearchResultListItem').then(\n m => m.ToolSearchResultListItem,\n ),\n predicate: result => result.type === 'tools',\n }),\n);\n"],"names":[],"mappings":";;;;;;;AAiCO,MAAM,gBAAgB,YAAa,CAAA;AAAA,EACxC,EAAI,EAAA,SAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,aAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,QAAU,EAAA,WAAA;AAAA,QACV,kBAAoB,EAAA;AAAA,OACtB;AAAA,MACA,OAAS,EAAA,CAAC,EAAE,YAAA,EAAc,UAAU,kBAAmB,EAAA;AAAA;AAAA,QAErD,IAAI,aAAc,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU,oBAAoB;AAAA;AAAA,KACnE,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,qBAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,SAAS,OAAO;AAAA,QACd,MAAM,QAAW,GAAA;AAGf,UAAO,OAAA,KAAA,CAAA;AAAA;AACT,OACF;AAAA,KACD;AAAA,GACH;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,OAAS,EAAA;AAAA,GACX;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,aAAe,EAAA;AAAA;AAEnB,CAAC;AAGM,MAAM,2BAEa,aAAc,CAAA,OAAA;AAAA,EACtC,mCAAoC,CAAA;AAAA,IAClC,IAAM,EAAA,0BAAA;AAAA,IACN,SAAW,EAAA,MACT,OAAO,oDAAuC,CAAE,CAAA,IAAA;AAAA,MAC9C,OAAK,CAAE,CAAA;AAAA,KACT;AAAA,IACF,SAAA,EAAW,CAAU,MAAA,KAAA,MAAA,CAAO,IAAS,KAAA;AAAA,GACtC;AACH;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { exploreToolsConfigRef } from '@backstage-community/plugin-explore-react';\nimport { catalogEntityRouteRef, exploreRouteRef } from './routes';\nimport {\n createApiFactory,\n createPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { ExploreClient, exploreApiRef } from './api';\nimport { ToolSearchResultListItemProps } from './components/ToolSearchResultListItem';\n// import { exampleTools } from './util/examples';\n\n/** @public */\nexport const explorePlugin = createPlugin({\n id: 'explore',\n apis: [\n createApiFactory({\n api: exploreApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n exploreToolsConfig: exploreToolsConfigRef,\n },\n factory: ({ discoveryApi, fetchApi, exploreToolsConfig }) =>\n // NOTE: The exploreToolsConfig is for backwards compatibility and will be removed in the future\n new ExploreClient({ discoveryApi, fetchApi, exploreToolsConfig }),\n }),\n /**\n * @deprecated Use ExploreApi from `@backstage-community/plugin-explore` instead\n *\n * Register a default for exploreToolsConfigRef, you may want to override\n * the API locally in your app.\n */\n createApiFactory({\n api: exploreToolsConfigRef,\n deps: {},\n factory: () => ({\n async getTools() {\n // Returning `undefined` will enable the explore-backend to be used via the ExploreClient.\n // If this API has been customized and returns data it will be respected first.\n return undefined as any;\n },\n }),\n }),\n ],\n routes: {\n explore: exploreRouteRef,\n },\n externalRoutes: {\n catalogEntity: catalogEntityRouteRef,\n },\n});\n\n/** @public */\nexport const ToolSearchResultListItem: (\n props: SearchResultListItemExtensionProps<ToolSearchResultListItemProps>,\n) => JSX.Element | null = explorePlugin.provide(\n createSearchResultListItemExtension({\n name: 'ToolSearchResultListItem',\n component: () =>\n import('./components/ToolSearchResultListItem').then(\n m => m.ToolSearchResultListItem,\n ),\n predicate: result => result.type === 'tools',\n }),\n);\n"],"names":[],"mappings":";;;;;;;AAiCO,MAAM,gBAAgB,YAAA,CAAa;AAAA,EACxC,EAAA,EAAI,SAAA;AAAA,EACJ,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,aAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc,eAAA;AAAA,QACd,QAAA,EAAU,WAAA;AAAA,QACV,kBAAA,EAAoB;AAAA,OACtB;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,UAAU,kBAAA,EAAmB;AAAA;AAAA,QAErD,IAAI,aAAA,CAAc,EAAE,YAAA,EAAc,QAAA,EAAU,oBAAoB;AAAA;AAAA,KACnE,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,qBAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,SAAS,OAAO;AAAA,QACd,MAAM,QAAA,GAAW;AAGf,UAAA,OAAO,MAAA;AAAA,QACT;AAAA,OACF;AAAA,KACD;AAAA,GACH;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,aAAA,EAAe;AAAA;AAEnB,CAAC;AAGM,MAAM,2BAEa,aAAA,CAAc,OAAA;AAAA,EACtC,mCAAA,CAAoC;AAAA,IAClC,IAAA,EAAM,0BAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,oDAAuC,CAAA,CAAE,IAAA;AAAA,MAC9C,OAAK,CAAA,CAAE;AAAA,KACT;AAAA,IACF,SAAA,EAAW,CAAA,MAAA,KAAU,MAAA,CAAO,IAAA,KAAS;AAAA,GACtC;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const exploreRouteRef = createRouteRef({\n id: 'explore',\n});\n\n/**\n * @deprecated This route is no longer used and can be removed\n * @public\n */\nexport const catalogEntityRouteRef = createExternalRouteRef({\n id: 'catalog-entity',\n params: ['namespace', 'kind', 'name'],\n optional: true,\n});\n"],"names":[],"mappings":";;AAsBO,MAAM,kBAAkB,cAAe,CAAA;AAAA,EAC5C,EAAI,EAAA;AACN,CAAC;AAMM,MAAM,wBAAwB,sBAAuB,CAAA;AAAA,EAC1D,EAAI,EAAA,gBAAA;AAAA,EACJ,MAAQ,EAAA,CAAC,WAAa,EAAA,MAAA,EAAQ,MAAM,CAAA;AAAA,EACpC,QAAU,EAAA;AACZ,CAAC;;;;"}
1
+ {"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const exploreRouteRef = createRouteRef({\n id: 'explore',\n});\n\n/**\n * @deprecated This route is no longer used and can be removed\n * @public\n */\nexport const catalogEntityRouteRef = createExternalRouteRef({\n id: 'catalog-entity',\n params: ['namespace', 'kind', 'name'],\n optional: true,\n});\n"],"names":[],"mappings":";;AAsBO,MAAM,kBAAkB,cAAA,CAAe;AAAA,EAC5C,EAAA,EAAI;AACN,CAAC;AAMM,MAAM,wBAAwB,sBAAA,CAAuB;AAAA,EAC1D,EAAA,EAAI,gBAAA;AAAA,EACJ,MAAA,EAAQ,CAAC,WAAA,EAAa,MAAA,EAAQ,MAAM,CAAA;AAAA,EACpC,QAAA,EAAU;AACZ,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-explore",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "A Backstage plugin for building an exploration page of your software ecosystem",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -69,18 +69,18 @@
69
69
  "test": "backstage-cli package test"
70
70
  },
71
71
  "dependencies": {
72
- "@backstage-community/plugin-explore-common": "^0.12.0",
73
- "@backstage-community/plugin-explore-react": "^0.12.0",
74
- "@backstage/catalog-client": "^1.12.1",
75
- "@backstage/catalog-model": "^1.7.6",
76
- "@backstage/core-compat-api": "^0.5.7",
77
- "@backstage/core-components": "^0.18.6",
78
- "@backstage/core-plugin-api": "^1.12.2",
72
+ "@backstage-community/plugin-explore-common": "^0.13.0",
73
+ "@backstage-community/plugin-explore-react": "^0.13.0",
74
+ "@backstage/catalog-client": "^1.14.0",
75
+ "@backstage/catalog-model": "^1.7.7",
76
+ "@backstage/core-compat-api": "^0.5.9",
77
+ "@backstage/core-components": "^0.18.8",
78
+ "@backstage/core-plugin-api": "^1.12.4",
79
79
  "@backstage/errors": "^1.2.7",
80
- "@backstage/frontend-plugin-api": "^0.13.4",
81
- "@backstage/plugin-catalog-react": "^1.21.6",
82
- "@backstage/plugin-search-common": "^1.2.21",
83
- "@backstage/plugin-search-react": "^1.10.2",
80
+ "@backstage/frontend-plugin-api": "^0.16.1",
81
+ "@backstage/plugin-catalog-react": "^2.1.0",
82
+ "@backstage/plugin-search-common": "^1.2.22",
83
+ "@backstage/plugin-search-react": "^1.11.0",
84
84
  "@material-ui/core": "^4.12.2",
85
85
  "@material-ui/icons": "^4.9.1",
86
86
  "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
@@ -89,12 +89,13 @@
89
89
  "react-use": "^17.2.4"
90
90
  },
91
91
  "devDependencies": {
92
- "@backstage/cli": "^0.35.3",
93
- "@backstage/core-app-api": "^1.19.4",
94
- "@backstage/dev-utils": "^1.1.19",
95
- "@backstage/frontend-defaults": "^0.3.6",
96
- "@backstage/plugin-catalog": "^1.32.2",
97
- "@backstage/test-utils": "^1.7.14",
92
+ "@backstage/cli": "^0.36.0",
93
+ "@backstage/core-app-api": "^1.19.6",
94
+ "@backstage/dev-utils": "^1.1.21",
95
+ "@backstage/frontend-defaults": "^0.5.0",
96
+ "@backstage/frontend-test-utils": "^0.5.1",
97
+ "@backstage/plugin-catalog": "^2.0.1",
98
+ "@backstage/test-utils": "^1.7.16",
98
99
  "@testing-library/dom": "^10.0.0",
99
100
  "@testing-library/jest-dom": "^6.0.0",
100
101
  "@testing-library/react": "^15.0.0",