@backstage-community/plugin-explore 0.4.21

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.
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import Box from '@material-ui/core/Box';
3
+ import Chip from '@material-ui/core/Chip';
4
+ import ListItemIcon from '@material-ui/core/ListItemIcon';
5
+ import ListItemText from '@material-ui/core/ListItemText';
6
+ import { makeStyles } from '@material-ui/core/styles';
7
+ import { Link } from '@backstage/core-components';
8
+ import { HighlightedSearchResultText } from '@backstage/plugin-search-react';
9
+
10
+ const useStyles = makeStyles(
11
+ {
12
+ flexContainer: {
13
+ flexWrap: "wrap"
14
+ },
15
+ itemText: {
16
+ width: "100%",
17
+ wordBreak: "break-all",
18
+ marginBottom: "1rem"
19
+ }
20
+ },
21
+ { name: "ExploreToolSearchResultListItem" }
22
+ );
23
+ function ToolSearchResultListItem(props) {
24
+ var _a, _b, _c;
25
+ const result = props.result;
26
+ const classes = useStyles();
27
+ if (!result)
28
+ return null;
29
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, props.icon && /* @__PURE__ */ React.createElement(ListItemIcon, null, typeof props.icon === "function" ? props.icon(result) : props.icon), /* @__PURE__ */ React.createElement("div", { className: classes.flexContainer }, /* @__PURE__ */ React.createElement(
30
+ ListItemText,
31
+ {
32
+ className: classes.itemText,
33
+ primaryTypographyProps: { variant: "h6" },
34
+ primary: /* @__PURE__ */ React.createElement(Link, { noTrack: true, to: result.location }, ((_a = props.highlight) == null ? void 0 : _a.fields.title) ? /* @__PURE__ */ React.createElement(
35
+ HighlightedSearchResultText,
36
+ {
37
+ text: props.highlight.fields.title,
38
+ preTag: props.highlight.preTag,
39
+ postTag: props.highlight.postTag
40
+ }
41
+ ) : result.title),
42
+ secondary: ((_b = props.highlight) == null ? void 0 : _b.fields.text) ? /* @__PURE__ */ React.createElement(
43
+ HighlightedSearchResultText,
44
+ {
45
+ text: props.highlight.fields.text,
46
+ preTag: props.highlight.preTag,
47
+ postTag: props.highlight.postTag
48
+ }
49
+ ) : result.text
50
+ }
51
+ ), /* @__PURE__ */ React.createElement(Box, null, (_c = result.tags) == null ? void 0 : _c.map((tag) => /* @__PURE__ */ React.createElement(Chip, { label: tag, size: "small" })))));
52
+ }
53
+
54
+ export { ToolSearchResultListItem };
55
+ //# sourceMappingURL=index-Cz8p9vYj.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Cz8p9vYj.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 React, { 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,MAAA;AAAA,KACZ;AAAA,IACA,QAAU,EAAA;AAAA,MACR,KAAO,EAAA,MAAA;AAAA,MACP,SAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,MAAA;AAAA,KAChB;AAAA,GACF;AAAA,EACA,EAAE,MAAM,iCAAkC,EAAA;AAC5C,CAAA,CAAA;AAeO,SAAS,yBAAyB,KAAsC,EAAA;AAxD/E,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAyDE,EAAA,MAAM,SAAS,KAAM,CAAA,MAAA,CAAA;AAErB,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAE1B,EAAA,IAAI,CAAC,MAAA;AAAQ,IAAO,OAAA,IAAA,CAAA;AAEpB,EACE,uBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QA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AAAA,UAG3B,MAAO,CAAA,IAAA;AAAA,KAAA;AAAA,qBAIZ,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,IAAA,EAAA,CACE,EAAO,GAAA,MAAA,CAAA,IAAA,KAAP,mBAAa,GAAI,CAAA,CAAC,GACjB,qBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,KAAO,EAAA,GAAA,EAAK,MAAK,OAAQ,EAAA,CAAA,CAEnC,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,65 @@
1
+ import { catalogApiRef } from '@backstage/plugin-catalog-react';
2
+ import Button from '@material-ui/core/Button';
3
+ import React from 'react';
4
+ import useAsync from 'react-use/esm/useAsync';
5
+ import { Content, ContentHeader, SupportButton, Progress, WarningPanel, EmptyState, ItemCardGrid } from '@backstage/core-components';
6
+ import { useApi } from '@backstage/core-plugin-api';
7
+ import { E as EntityCard } from './index-DrIeHaZd.esm.js';
8
+ import '@backstage/errors';
9
+ import '@backstage/catalog-model';
10
+ import '@material-ui/core/Box';
11
+ import '@material-ui/core/Card';
12
+ import '@material-ui/core/CardActions';
13
+ import '@material-ui/core/CardContent';
14
+ import '@material-ui/core/CardMedia';
15
+ import '@material-ui/core/Chip';
16
+ import 'pluralize';
17
+ import '@backstage-community/plugin-explore-react';
18
+ import '@backstage/plugin-search-react';
19
+
20
+ const Body = () => {
21
+ const catalogApi = useApi(catalogApiRef);
22
+ const {
23
+ value: entities,
24
+ loading,
25
+ error
26
+ } = useAsync(async () => {
27
+ const response = await catalogApi.getEntities({
28
+ filter: { kind: "domain" }
29
+ });
30
+ return response.items;
31
+ }, [catalogApi]);
32
+ if (loading) {
33
+ return /* @__PURE__ */ React.createElement(Progress, null);
34
+ }
35
+ if (error) {
36
+ return /* @__PURE__ */ React.createElement(WarningPanel, { severity: "error", title: "Could not load domains." }, error.message);
37
+ }
38
+ if (!(entities == null ? void 0 : entities.length)) {
39
+ return /* @__PURE__ */ React.createElement(
40
+ EmptyState,
41
+ {
42
+ missing: "info",
43
+ title: "No domains to display",
44
+ description: "You haven't added any domains yet.",
45
+ action: /* @__PURE__ */ React.createElement(
46
+ Button,
47
+ {
48
+ variant: "contained",
49
+ color: "primary",
50
+ href: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain"
51
+ },
52
+ "Read more"
53
+ )
54
+ }
55
+ );
56
+ }
57
+ return /* @__PURE__ */ React.createElement(ItemCardGrid, null, entities.map((entity, index) => /* @__PURE__ */ React.createElement(EntityCard, { key: index, entity })));
58
+ };
59
+ const DomainExplorerContent = (props) => {
60
+ var _a;
61
+ return /* @__PURE__ */ React.createElement(Content, { noPadding: true }, /* @__PURE__ */ React.createElement(ContentHeader, { title: (_a = props.title) != null ? _a : "Domains" }, /* @__PURE__ */ React.createElement(SupportButton, null, "Discover the domains in your ecosystem.")), /* @__PURE__ */ React.createElement(Body, null));
62
+ };
63
+
64
+ export { DomainExplorerContent };
65
+ //# sourceMappingURL=index-DBoY59Wh.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DBoY59Wh.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 React from 'react';\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":";;;;;;;;;;;;;;;;;;;AAiCA,MAAM,OAAO,MAAM;AACjB,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AACvC,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,QAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,GACF,GAAI,SAAS,YAAY;AACvB,IAAM,MAAA,QAAA,GAAW,MAAM,UAAA,CAAW,WAAY,CAAA;AAAA,MAC5C,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAS,EAAA;AAAA,KAC1B,CAAA,CAAA;AACD,IAAA,OAAO,QAAS,CAAA,KAAA,CAAA;AAAA,GAClB,EAAG,CAAC,UAAU,CAAC,CAAA,CAAA;AAEf,EAAA,IAAI,OAAS,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,CAAA,aAAA,CAAC,UAAK,CACR,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,23 @@
1
+ export { T as ToolExplorerContent } from './ToolExplorerContent-DzMkzhod.esm.js';
2
+ import 'react';
3
+ import 'react-use/esm/useAsync';
4
+ import '@material-ui/core/Box';
5
+ import '@material-ui/core/Card';
6
+ import '@material-ui/core/CardActions';
7
+ import '@material-ui/core/CardContent';
8
+ import '@material-ui/core/CardMedia';
9
+ import '@material-ui/core/Chip';
10
+ import '@material-ui/core/Typography';
11
+ import '@material-ui/core/styles';
12
+ import '@backstage/core-components';
13
+ import 'classnames';
14
+ import '@backstage/core-plugin-api';
15
+ import '@backstage/errors';
16
+ import './index-DrIeHaZd.esm.js';
17
+ import '@backstage/plugin-catalog-react';
18
+ import '@material-ui/core/Button';
19
+ import '@backstage/catalog-model';
20
+ import 'pluralize';
21
+ import '@backstage-community/plugin-explore-react';
22
+ import '@backstage/plugin-search-react';
23
+ //# sourceMappingURL=index-DVlrZV4C.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DVlrZV4C.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,280 @@
1
+ import { ResponseError } from '@backstage/errors';
2
+ import { createApiRef, useRouteRef, useApi, attachComponentData, useElementFilter, createRouteRef, createExternalRouteRef, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
3
+ import { entityRouteRef, getEntityRelations, entityRouteParams, EntityRefLinks, catalogApiRef } from '@backstage/plugin-catalog-react';
4
+ import Button from '@material-ui/core/Button';
5
+ import React from 'react';
6
+ import useAsync from 'react-use/esm/useAsync';
7
+ import { RELATION_OWNED_BY } from '@backstage/catalog-model';
8
+ import Box from '@material-ui/core/Box';
9
+ import Card from '@material-ui/core/Card';
10
+ import CardActions from '@material-ui/core/CardActions';
11
+ import CardContent from '@material-ui/core/CardContent';
12
+ import CardMedia from '@material-ui/core/CardMedia';
13
+ import Chip from '@material-ui/core/Chip';
14
+ import { ItemCardHeader, LinkButton, Content, ContentHeader, SupportButton, Progress, WarningPanel, EmptyState, ItemCardGrid, Page, Header, RoutedTabs } from '@backstage/core-components';
15
+ import pluralize from 'pluralize';
16
+ import { exploreToolsConfigRef } from '@backstage-community/plugin-explore-react';
17
+ import { createSearchResultListItemExtension } from '@backstage/plugin-search-react';
18
+
19
+ var __defProp = Object.defineProperty;
20
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21
+ var __publicField = (obj, key, value) => {
22
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
23
+ return value;
24
+ };
25
+ class ExploreClient {
26
+ /**
27
+ * @remarks
28
+ *
29
+ * The `exploreToolsConfig` is for backwards compatibility with the `exploreToolsConfigRef`•
30
+ * and will be removed in the future.
31
+ */
32
+ constructor(options) {
33
+ __publicField(this, "discoveryApi");
34
+ __publicField(this, "fetchApi");
35
+ // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method
36
+ __publicField(this, "exploreToolsConfig");
37
+ this.discoveryApi = options.discoveryApi;
38
+ this.fetchApi = options.fetchApi;
39
+ this.exploreToolsConfig = options.exploreToolsConfig;
40
+ }
41
+ async getTools(request = {}) {
42
+ var _a, _b, _c, _d, _e;
43
+ if (this.exploreToolsConfig) {
44
+ const tools = await this.exploreToolsConfig.getTools();
45
+ if (tools) {
46
+ return { tools };
47
+ }
48
+ }
49
+ const { fetch } = this.fetchApi;
50
+ const filter = (_a = request.filter) != null ? _a : {};
51
+ const baseUrl = await this.discoveryApi.getBaseUrl("explore");
52
+ const tags = (_c = (_b = filter == null ? void 0 : filter.tags) == null ? void 0 : _b.map((t) => `tag=${encodeURIComponent(t)}`)) != null ? _c : [];
53
+ const lifecycles = (_e = (_d = filter == null ? void 0 : filter.lifecycle) == null ? void 0 : _d.map((l) => `lifecycle=${encodeURIComponent(l)}`)) != null ? _e : [];
54
+ const query = [...tags, ...lifecycles].join("&");
55
+ const response = await fetch(`${baseUrl}/tools${query ? `?${query}` : ""}`);
56
+ if (!response.ok) {
57
+ throw await ResponseError.fromResponse(response);
58
+ }
59
+ return response.json();
60
+ }
61
+ }
62
+
63
+ const exploreApiRef = createApiRef({
64
+ id: "plugin.explore.service"
65
+ });
66
+
67
+ const EntityCard = (props) => {
68
+ var _a, _b;
69
+ const { entity } = props;
70
+ const catalogEntityRoute = useRouteRef(entityRouteRef);
71
+ const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);
72
+ const url = catalogEntityRoute(entityRouteParams(entity));
73
+ const owner = /* @__PURE__ */ React.createElement(
74
+ EntityRefLinks,
75
+ {
76
+ entityRefs: ownedByRelations,
77
+ defaultKind: "group",
78
+ color: "inherit"
79
+ }
80
+ );
81
+ return /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardMedia, null, /* @__PURE__ */ React.createElement(
82
+ ItemCardHeader,
83
+ {
84
+ title: (_a = entity.metadata.title) != null ? _a : entity.metadata.name,
85
+ subtitle: owner
86
+ }
87
+ )), /* @__PURE__ */ React.createElement(CardContent, null, ((_b = entity.metadata.tags) == null ? void 0 : _b.length) ? /* @__PURE__ */ React.createElement(Box, null, entity.metadata.tags.map((tag) => /* @__PURE__ */ React.createElement(Chip, { size: "small", label: tag, key: tag }))) : null, entity.metadata.description), /* @__PURE__ */ React.createElement(CardActions, null, /* @__PURE__ */ React.createElement(LinkButton, { to: url, color: "primary" }, "Explore")));
88
+ };
89
+
90
+ const Body = (props) => {
91
+ const { kind } = props;
92
+ const kindPlural = pluralize(kind);
93
+ const catalogApi = useApi(catalogApiRef);
94
+ const {
95
+ value: entities,
96
+ loading,
97
+ error
98
+ } = useAsync(async () => {
99
+ const response = await catalogApi.getEntities({
100
+ filter: { kind }
101
+ });
102
+ return response.items;
103
+ }, [kind]);
104
+ if (loading) {
105
+ return /* @__PURE__ */ React.createElement(Progress, null);
106
+ }
107
+ if (error) {
108
+ return /* @__PURE__ */ React.createElement(WarningPanel, { severity: "error", title: `Could not load ${kindPlural}.` }, error.message);
109
+ }
110
+ if (!(entities == null ? void 0 : entities.length)) {
111
+ return /* @__PURE__ */ React.createElement(
112
+ EmptyState,
113
+ {
114
+ missing: "info",
115
+ title: `No ${kindPlural} to display`,
116
+ description: `You haven't added any ${kindPlural} yet.`,
117
+ action: /* @__PURE__ */ React.createElement(
118
+ Button,
119
+ {
120
+ variant: "contained",
121
+ color: "primary",
122
+ href: `https://backstage.io/docs/features/software-catalog/descriptor-format#kind-${kind}`
123
+ },
124
+ "Read more"
125
+ )
126
+ }
127
+ );
128
+ }
129
+ return /* @__PURE__ */ React.createElement(ItemCardGrid, null, entities.map((entity, index) => /* @__PURE__ */ React.createElement(EntityCard, { key: index, entity })));
130
+ };
131
+ const CatalogKindExploreContent = (props) => {
132
+ const { kind, title } = props;
133
+ const kindLowercase = kind.toLocaleLowerCase();
134
+ const kindCapitalized = `${kind[0].toLocaleUpperCase()}${kind.substring(1)}`;
135
+ return /* @__PURE__ */ React.createElement(Content, { noPadding: true }, /* @__PURE__ */ React.createElement(ContentHeader, { title: title || `${pluralize(kindCapitalized)}` }, /* @__PURE__ */ React.createElement(SupportButton, null, /* @__PURE__ */ React.createElement(React.Fragment, null, "Discover the ", pluralize(kindLowercase), " in your ecosystem."))), /* @__PURE__ */ React.createElement(Body, { kind: kindLowercase }));
136
+ };
137
+
138
+ const dataKey = "plugin.explore.exploreLayoutRoute";
139
+ const Route = () => null;
140
+ attachComponentData(Route, dataKey, true);
141
+ attachComponentData(Route, "core.gatherMountPoints", true);
142
+ const ExploreLayout = (props) => {
143
+ const { title, subtitle, children } = props;
144
+ const routes = useElementFilter(
145
+ children,
146
+ (elements) => elements.selectByComponentData({
147
+ key: dataKey,
148
+ withStrictError: "Child of ExploreLayout must be an ExploreLayout.Route"
149
+ }).getElements().map((child) => child.props)
150
+ );
151
+ return /* @__PURE__ */ React.createElement(Page, { themeId: "home" }, /* @__PURE__ */ React.createElement(
152
+ Header,
153
+ {
154
+ title: title != null ? title : "Explore our ecosystem",
155
+ subtitle: subtitle != null ? subtitle : "Discover solutions available in our ecosystem"
156
+ }
157
+ ), /* @__PURE__ */ React.createElement(RoutedTabs, { routes }));
158
+ };
159
+ ExploreLayout.Route = Route;
160
+
161
+ const DomainCard = (props) => {
162
+ var _a, _b;
163
+ const { entity } = props;
164
+ const catalogEntityRoute = useRouteRef(entityRouteRef);
165
+ const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);
166
+ const url = catalogEntityRoute(entityRouteParams(entity));
167
+ const owner = /* @__PURE__ */ React.createElement(
168
+ EntityRefLinks,
169
+ {
170
+ entityRefs: ownedByRelations,
171
+ defaultKind: "group",
172
+ color: "inherit"
173
+ }
174
+ );
175
+ return /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardMedia, null, /* @__PURE__ */ React.createElement(
176
+ ItemCardHeader,
177
+ {
178
+ title: (_a = entity.metadata.title) != null ? _a : entity.metadata.name,
179
+ subtitle: owner
180
+ }
181
+ )), /* @__PURE__ */ React.createElement(CardContent, null, ((_b = entity.metadata.tags) == null ? void 0 : _b.length) ? /* @__PURE__ */ React.createElement(Box, null, entity.metadata.tags.map((tag) => /* @__PURE__ */ React.createElement(Chip, { size: "small", label: tag, key: tag }))) : null, entity.metadata.description), /* @__PURE__ */ React.createElement(CardActions, null, /* @__PURE__ */ React.createElement(LinkButton, { to: url, color: "primary" }, "Explore")));
182
+ };
183
+
184
+ const exploreRouteRef = createRouteRef({
185
+ id: "explore"
186
+ });
187
+ const catalogEntityRouteRef = createExternalRouteRef({
188
+ id: "catalog-entity",
189
+ params: ["namespace", "kind", "name"],
190
+ optional: true
191
+ });
192
+
193
+ const explorePlugin = createPlugin({
194
+ id: "explore",
195
+ apis: [
196
+ createApiFactory({
197
+ api: exploreApiRef,
198
+ deps: {
199
+ discoveryApi: discoveryApiRef,
200
+ fetchApi: fetchApiRef,
201
+ exploreToolsConfig: exploreToolsConfigRef
202
+ },
203
+ factory: ({ discoveryApi, fetchApi, exploreToolsConfig }) => (
204
+ // NOTE: The exploreToolsConfig is for backwards compatibility and will be removed in the future
205
+ new ExploreClient({ discoveryApi, fetchApi, exploreToolsConfig })
206
+ )
207
+ }),
208
+ /**
209
+ * @deprecated Use ExploreApi from `@backstage-community/plugin-explore` instead
210
+ *
211
+ * Register a default for exploreToolsConfigRef, you may want to override
212
+ * the API locally in your app.
213
+ */
214
+ createApiFactory({
215
+ api: exploreToolsConfigRef,
216
+ deps: {},
217
+ factory: () => ({
218
+ async getTools() {
219
+ return void 0;
220
+ }
221
+ })
222
+ })
223
+ ],
224
+ routes: {
225
+ explore: exploreRouteRef
226
+ },
227
+ externalRoutes: {
228
+ catalogEntity: catalogEntityRouteRef
229
+ }
230
+ });
231
+ const ToolSearchResultListItem = explorePlugin.provide(
232
+ createSearchResultListItemExtension({
233
+ name: "ToolSearchResultListItem",
234
+ component: () => import('./index-Cz8p9vYj.esm.js').then(
235
+ (m) => m.ToolSearchResultListItem
236
+ ),
237
+ predicate: (result) => result.type === "tools"
238
+ })
239
+ );
240
+
241
+ const ExplorePage = explorePlugin.provide(
242
+ createRoutableExtension({
243
+ name: "ExplorePage",
244
+ component: () => import('./index-CeOO34TY.esm.js').then((m) => m.ExplorePage),
245
+ mountPoint: exploreRouteRef
246
+ })
247
+ );
248
+ const DomainExplorerContent = explorePlugin.provide(
249
+ createComponentExtension({
250
+ name: "DomainExplorerContent",
251
+ component: {
252
+ lazy: () => import('./index-DBoY59Wh.esm.js').then(
253
+ (m) => m.DomainExplorerContent
254
+ )
255
+ }
256
+ })
257
+ );
258
+ const GroupsExplorerContent = explorePlugin.provide(
259
+ createComponentExtension({
260
+ name: "GroupsExplorerContent",
261
+ component: {
262
+ lazy: () => import('./index-B_Dn9qT_.esm.js').then(
263
+ (m) => m.GroupsExplorerContent
264
+ )
265
+ }
266
+ })
267
+ );
268
+ const ToolExplorerContent = explorePlugin.provide(
269
+ createComponentExtension({
270
+ name: "ToolExplorerContent",
271
+ component: {
272
+ lazy: () => import('./index-DVlrZV4C.esm.js').then(
273
+ (m) => m.ToolExplorerContent
274
+ )
275
+ }
276
+ })
277
+ );
278
+
279
+ export { CatalogKindExploreContent as C, DomainCard as D, EntityCard as E, GroupsExplorerContent as G, ToolSearchResultListItem as T, ExploreLayout as a, explorePlugin as b, ExploreClient as c, ExplorePage as d, exploreApiRef as e, DomainExplorerContent as f, ToolExplorerContent as g, exploreRouteRef as h, catalogEntityRouteRef as i };
280
+ //# sourceMappingURL=index-DrIeHaZd.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DrIeHaZd.esm.js","sources":["../../src/api/ExploreClient.ts","../../src/api/ExploreApi.ts","../../src/components/EntityCard/EntityCard.tsx","../../src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx","../../src/components/ExploreLayout/ExploreLayout.tsx","../../src/components/DomainCard/DomainCard.tsx","../../src/routes.ts","../../src/plugin.ts","../../src/extensions.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 { 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","/*\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","/*\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';\nimport React from 'react';\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 </Card>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport React from 'react';\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","/*\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","/*\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';\nimport React from 'react';\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","/*\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","/*\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","/*\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":";;;;;;;;;;;;;;;;;;;;;;;;AA8BO,MAAM,aAAoC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY/C,YAAY,OAIT,EAAA;AAfH,IAAiB,aAAA,C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