@backstage/plugin-catalog 1.19.0-next.0 → 1.19.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.
- package/CHANGELOG.md +53 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.esm.js +1 -1
- package/dist/esm/{AboutCard-CNe995Li.esm.js → AboutCard-DxbQJUXT.esm.js} +39 -5
- package/dist/esm/AboutCard-DxbQJUXT.esm.js.map +1 -0
- package/dist/esm/{CatalogTable-D9UBRyWs.esm.js → CatalogTable-B8071eCT.esm.js} +11 -1
- package/dist/esm/CatalogTable-B8071eCT.esm.js.map +1 -0
- package/dist/esm/{EntityOverviewPage-Bzd86gsX.esm.js → EntityOverviewPage-BrKzcB2g.esm.js} +2 -2
- package/dist/esm/{EntityOverviewPage-Bzd86gsX.esm.js.map → EntityOverviewPage-BrKzcB2g.esm.js.map} +1 -1
- package/dist/esm/{alpha-DdRYU8jw.esm.js → alpha-DpxXch-c.esm.js} +14 -7
- package/dist/esm/alpha-DpxXch-c.esm.js.map +1 -0
- package/dist/esm/{index-tUif74w6.esm.js → index-B9rsO45f.esm.js} +2 -2
- package/dist/esm/{index-tUif74w6.esm.js.map → index-B9rsO45f.esm.js.map} +1 -1
- package/dist/esm/{index-lfnLfSQ_.esm.js → index-CTye7k-V.esm.js} +3 -2
- package/dist/esm/index-CTye7k-V.esm.js.map +1 -0
- package/dist/index.esm.js +5 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
- package/dist/esm/AboutCard-CNe995Li.esm.js.map +0 -1
- package/dist/esm/CatalogTable-D9UBRyWs.esm.js.map +0 -1
- package/dist/esm/alpha-DdRYU8jw.esm.js.map +0 -1
- package/dist/esm/index-lfnLfSQ_.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 18c7f12: Add `isApiType()` to EntitySwitch routing functions.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- bcb2674: Added a "create something similar" button to the `<AboutCard>` that is visible and links to the scaffolder template corresponding to the entity's `backstage.io/source-template` annotation, if present.
|
|
12
|
+
- 4ef0dcf: Fixed a bug that prevented the default `entityPresentationApi` from being set in apps using the new frontend system.
|
|
13
|
+
- abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`.
|
|
14
|
+
- cb1e3b0: Updated dependency `@testing-library/dom` to `^10.0.0`.
|
|
15
|
+
- 7495b36: Fixed sorting of columns created with `CatalogTable.columns.createLabelColumn`.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @backstage/plugin-search-react@1.7.10
|
|
18
|
+
- @backstage/plugin-catalog-react@1.11.3
|
|
19
|
+
- @backstage/core-compat-api@0.2.4
|
|
20
|
+
- @backstage/core-components@0.14.4
|
|
21
|
+
- @backstage/core-plugin-api@1.9.2
|
|
22
|
+
- @backstage/frontend-plugin-api@0.6.4
|
|
23
|
+
- @backstage/plugin-permission-react@0.4.22
|
|
24
|
+
- @backstage/integration-react@1.1.26
|
|
25
|
+
- @backstage/catalog-client@1.6.4
|
|
26
|
+
- @backstage/catalog-model@1.4.5
|
|
27
|
+
- @backstage/errors@1.2.4
|
|
28
|
+
- @backstage/types@1.1.1
|
|
29
|
+
- @backstage/plugin-catalog-common@1.0.22
|
|
30
|
+
- @backstage/plugin-scaffolder-common@1.5.1
|
|
31
|
+
- @backstage/plugin-search-common@1.2.11
|
|
32
|
+
|
|
33
|
+
## 1.19.0-next.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- bcb2674: Added a "create something similar" button to the `<AboutCard>` that is visible and links to the scaffolder template corresponding to the entity's `backstage.io/source-template` annotation, if present.
|
|
38
|
+
- 4ef0dcf: Fixed a bug that prevented the default `entityPresentationApi` from being set in apps using the new frontend system.
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
- @backstage/catalog-client@1.6.4-next.0
|
|
41
|
+
- @backstage/frontend-plugin-api@0.6.4-next.1
|
|
42
|
+
- @backstage/core-compat-api@0.2.4-next.1
|
|
43
|
+
- @backstage/catalog-model@1.4.5
|
|
44
|
+
- @backstage/core-components@0.14.4-next.0
|
|
45
|
+
- @backstage/core-plugin-api@1.9.1
|
|
46
|
+
- @backstage/errors@1.2.4
|
|
47
|
+
- @backstage/integration-react@1.1.26-next.0
|
|
48
|
+
- @backstage/types@1.1.1
|
|
49
|
+
- @backstage/plugin-catalog-common@1.0.22
|
|
50
|
+
- @backstage/plugin-catalog-react@1.11.3-next.1
|
|
51
|
+
- @backstage/plugin-permission-react@0.4.21
|
|
52
|
+
- @backstage/plugin-scaffolder-common@1.5.1
|
|
53
|
+
- @backstage/plugin-search-common@1.2.11
|
|
54
|
+
- @backstage/plugin-search-react@1.7.10-next.1
|
|
55
|
+
|
|
3
56
|
## 1.19.0-next.0
|
|
4
57
|
|
|
5
58
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createCatalogFilterExtension, p as default } from './esm/alpha-
|
|
1
|
+
export { c as createCatalogFilterExtension, p as default } from './esm/alpha-DpxXch-c.esm.js';
|
|
2
2
|
import '@backstage/core-compat-api';
|
|
3
3
|
import '@backstage/frontend-plugin-api';
|
|
4
4
|
import '@backstage/plugin-catalog-react';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation,
|
|
1
|
+
import { RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation, parseEntityRef, ANNOTATION_EDIT_URL, DEFAULT_NAMESPACE, ANNOTATION_LOCATION, stringifyEntityRef } from '@backstage/catalog-model';
|
|
2
2
|
import Card from '@material-ui/core/Card';
|
|
3
3
|
import CardContent from '@material-ui/core/CardContent';
|
|
4
4
|
import CardHeader from '@material-ui/core/CardHeader';
|
|
5
5
|
import Divider from '@material-ui/core/Divider';
|
|
6
6
|
import IconButton from '@material-ui/core/IconButton';
|
|
7
7
|
import { makeStyles } from '@material-ui/core/styles';
|
|
8
|
-
import { MarkdownContent, Link, HeaderIconLinkRow } from '@backstage/core-components';
|
|
8
|
+
import { MarkdownContent, Link, AppIcon, HeaderIconLinkRow } from '@backstage/core-components';
|
|
9
9
|
import React, { useCallback } from 'react';
|
|
10
10
|
import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
|
|
11
|
-
import { useElementFilter,
|
|
12
|
-
import { getEntityRelations, EntityRefLinks,
|
|
11
|
+
import { useElementFilter, useApi, useApp, alertApiRef, errorApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
12
|
+
import { getEntityRelations, EntityRefLinks, catalogApiRef, useEntity, getEntitySourceLocation as getEntitySourceLocation$1 } from '@backstage/plugin-catalog-react';
|
|
13
13
|
import { v as viewTechDocRouteRef, a as createFromTemplateRouteRef } from './routes-D5H5grpG.esm.js';
|
|
14
14
|
import Chip from '@material-ui/core/Chip';
|
|
15
15
|
import Grid from '@material-ui/core/Grid';
|
|
@@ -22,6 +22,7 @@ import EditIcon from '@material-ui/icons/Edit';
|
|
|
22
22
|
import { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
23
23
|
import { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';
|
|
24
24
|
import { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';
|
|
25
|
+
import useAsync from 'react-use/lib/useAsync';
|
|
25
26
|
|
|
26
27
|
const useStyles$2 = makeStyles((theme) => ({
|
|
27
28
|
value: {
|
|
@@ -191,6 +192,27 @@ function AboutContent(props) {
|
|
|
191
192
|
)));
|
|
192
193
|
}
|
|
193
194
|
|
|
195
|
+
const SOURCE_TEMPLATE_ANNOTATION = "backstage.io/source-template";
|
|
196
|
+
const useSourceTemplateCompoundEntityRef = (entity) => {
|
|
197
|
+
const catalogApi = useApi(catalogApiRef);
|
|
198
|
+
const { value: sourceTemplateRef } = useAsync(async () => {
|
|
199
|
+
var _a;
|
|
200
|
+
const refCandidate = (_a = entity.metadata.annotations) == null ? void 0 : _a[SOURCE_TEMPLATE_ANNOTATION];
|
|
201
|
+
let compoundRefCandidate;
|
|
202
|
+
if (!refCandidate) {
|
|
203
|
+
return void 0;
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
const template = await catalogApi.getEntityByRef(refCandidate);
|
|
207
|
+
compoundRefCandidate = parseEntityRef(refCandidate);
|
|
208
|
+
return template !== void 0 ? compoundRefCandidate : void 0;
|
|
209
|
+
} catch {
|
|
210
|
+
return void 0;
|
|
211
|
+
}
|
|
212
|
+
}, [catalogApi, entity]);
|
|
213
|
+
return sourceTemplateRef;
|
|
214
|
+
};
|
|
215
|
+
|
|
194
216
|
const TECHDOCS_ANNOTATION = "backstage.io/techdocs-ref";
|
|
195
217
|
const TECHDOCS_EXTERNAL_ANNOTATION = "backstage.io/techdocs-entity";
|
|
196
218
|
const useStyles = makeStyles({
|
|
@@ -225,6 +247,7 @@ function AboutCard(props) {
|
|
|
225
247
|
const errorApi = useApi(errorApiRef);
|
|
226
248
|
const viewTechdocLink = useRouteRef(viewTechDocRouteRef);
|
|
227
249
|
const templateRoute = useRouteRef(createFromTemplateRouteRef);
|
|
250
|
+
const sourceTemplateRef = useSourceTemplateCompoundEntityRef(entity);
|
|
228
251
|
const { allowed: canRefresh } = useEntityPermission(
|
|
229
252
|
catalogEntityRefreshPermission
|
|
230
253
|
);
|
|
@@ -325,6 +348,17 @@ function AboutCard(props) {
|
|
|
325
348
|
to: entityMetadataEditUrl != null ? entityMetadataEditUrl : "#"
|
|
326
349
|
},
|
|
327
350
|
/* @__PURE__ */ React.createElement(EditIcon, null)
|
|
351
|
+
), sourceTemplateRef && templateRoute && /* @__PURE__ */ React.createElement(
|
|
352
|
+
IconButton,
|
|
353
|
+
{
|
|
354
|
+
component: Link,
|
|
355
|
+
title: "Create something similar",
|
|
356
|
+
to: templateRoute({
|
|
357
|
+
namespace: sourceTemplateRef.namespace,
|
|
358
|
+
templateName: sourceTemplateRef.name
|
|
359
|
+
})
|
|
360
|
+
},
|
|
361
|
+
/* @__PURE__ */ React.createElement(AppIcon, { id: "scaffolder" })
|
|
328
362
|
)),
|
|
329
363
|
subheader: /* @__PURE__ */ React.createElement(HeaderIconLinkRow, { links: subHeaderLinks })
|
|
330
364
|
}
|
|
@@ -332,4 +366,4 @@ function AboutCard(props) {
|
|
|
332
366
|
}
|
|
333
367
|
|
|
334
368
|
export { AboutCard as A, AboutContent as a, AboutField as b };
|
|
335
|
-
//# sourceMappingURL=AboutCard-
|
|
369
|
+
//# sourceMappingURL=AboutCard-DxbQJUXT.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutCard-DxbQJUXT.esm.js","sources":["../../src/components/AboutCard/AboutField.tsx","../../src/components/AboutCard/AboutContent.tsx","../../src/components/AboutCard/hooks.ts","../../src/components/AboutCard/AboutCard.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 { useElementFilter } from '@backstage/core-plugin-api';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\n\nconst useStyles = makeStyles(theme => ({\n value: {\n fontWeight: 'bold',\n overflow: 'hidden',\n lineHeight: '24px',\n wordBreak: 'break-word',\n },\n label: {\n color: theme.palette.text.secondary,\n textTransform: 'uppercase',\n fontSize: '10px',\n fontWeight: 'bold',\n letterSpacing: 0.5,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n}));\n\n/**\n * Props for {@link AboutField}.\n *\n * @public\n */\nexport interface AboutFieldProps {\n label: string;\n value?: string;\n gridSizes?: Record<string, number>;\n children?: React.ReactNode;\n}\n\n/** @public */\nexport function AboutField(props: AboutFieldProps) {\n const { label, value, gridSizes, children } = props;\n const classes = useStyles();\n\n const childElements = useElementFilter(children, c => c.getElements());\n\n // Content is either children or a string prop `value`\n const content =\n childElements.length > 0 ? (\n childElements\n ) : (\n <Typography variant=\"body2\" className={classes.value}>\n {value || `unknown`}\n </Typography>\n );\n return (\n <Grid item {...gridSizes}>\n <Typography variant=\"h2\" className={classes.label}>\n {label}\n </Typography>\n {content}\n </Grid>\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 Entity,\n getEntitySourceLocation,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { JsonArray } from '@backstage/types';\nimport Chip from '@material-ui/core/Chip';\nimport Grid from '@material-ui/core/Grid';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { MarkdownContent } from '@backstage/core-components';\nimport React from 'react';\nimport { AboutField } from './AboutField';\nimport { LinksGridList } from '../EntityLinksCard/LinksGridList';\n\nconst useStyles = makeStyles({\n description: {\n wordBreak: 'break-word',\n },\n});\n\n/**\n * Props for {@link AboutContent}.\n *\n * @public\n */\nexport interface AboutContentProps {\n entity: Entity;\n}\n\nfunction getLocationTargetHref(\n target: string,\n type: string,\n entitySourceLocation: {\n type: string;\n target: string;\n },\n): string {\n if (type === 'url' || target.includes('://')) {\n return target;\n }\n\n const srcLocationUrl =\n entitySourceLocation.type === 'file'\n ? `file://${entitySourceLocation.target}`\n : entitySourceLocation.target;\n\n if (type === 'file' || entitySourceLocation.type === 'file') {\n return new URL(target, srcLocationUrl).href;\n }\n\n return srcLocationUrl;\n}\n\n/** @public */\nexport function AboutContent(props: AboutContentProps) {\n const { entity } = props;\n const classes = useStyles();\n const isSystem = entity.kind.toLocaleLowerCase('en-US') === 'system';\n const isResource = entity.kind.toLocaleLowerCase('en-US') === 'resource';\n const isComponent = entity.kind.toLocaleLowerCase('en-US') === 'component';\n const isAPI = entity.kind.toLocaleLowerCase('en-US') === 'api';\n const isTemplate = entity.kind.toLocaleLowerCase('en-US') === 'template';\n const isLocation = entity.kind.toLocaleLowerCase('en-US') === 'location';\n const isGroup = entity.kind.toLocaleLowerCase('en-US') === 'group';\n\n const partOfSystemRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'system',\n });\n const partOfComponentRelations = getEntityRelations(\n entity,\n RELATION_PART_OF,\n {\n kind: 'component',\n },\n );\n const partOfDomainRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'domain',\n });\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n\n let entitySourceLocation:\n | {\n type: string;\n target: string;\n }\n | undefined;\n try {\n entitySourceLocation = getEntitySourceLocation(entity);\n } catch (e) {\n entitySourceLocation = undefined;\n }\n\n return (\n <Grid container>\n <AboutField label=\"Description\" gridSizes={{ xs: 12 }}>\n <MarkdownContent\n className={classes.description}\n content={entity?.metadata?.description || 'No description'}\n />\n </AboutField>\n <AboutField\n label=\"Owner\"\n value=\"No Owner\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {ownedByRelations.length > 0 && (\n <EntityRefLinks entityRefs={ownedByRelations} defaultKind=\"group\" />\n )}\n </AboutField>\n {(isSystem || partOfDomainRelations.length > 0) && (\n <AboutField\n label=\"Domain\"\n value=\"No Domain\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfDomainRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfDomainRelations}\n defaultKind=\"domain\"\n />\n )}\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n partOfSystemRelations.length > 0) && (\n <AboutField\n label=\"System\"\n value=\"No System\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfSystemRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfSystemRelations}\n defaultKind=\"system\"\n />\n )}\n </AboutField>\n )}\n {isComponent && partOfComponentRelations.length > 0 && (\n <AboutField\n label=\"Parent Component\"\n value=\"No Parent Component\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n <EntityRefLinks\n entityRefs={partOfComponentRelations}\n defaultKind=\"component\"\n />\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n isTemplate ||\n isGroup ||\n isLocation ||\n typeof entity?.spec?.type === 'string') && (\n <AboutField\n label=\"Type\"\n value={entity?.spec?.type as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n {(isAPI ||\n isComponent ||\n typeof entity?.spec?.lifecycle === 'string') && (\n <AboutField\n label=\"Lifecycle\"\n value={entity?.spec?.lifecycle as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n <AboutField\n label=\"Tags\"\n value=\"No Tags\"\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {(entity?.metadata?.tags || []).map(t => (\n <Chip key={t} size=\"small\" label={t} />\n ))}\n </AboutField>\n {isLocation && (entity?.spec?.targets || entity?.spec?.target) && (\n <AboutField label=\"Targets\" gridSizes={{ xs: 12 }}>\n <LinksGridList\n cols={1}\n items={((entity.spec.targets as JsonArray) || [entity.spec.target])\n .map(target => target as string)\n .map(target => ({\n text: target,\n href: getLocationTargetHref(\n target,\n (entity?.spec?.type || 'unknown') as string,\n entitySourceLocation!,\n ),\n }))}\n />\n </AboutField>\n )}\n </Grid>\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 */\nimport {\n CompoundEntityRef,\n Entity,\n parseEntityRef,\n} from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport useAsync from 'react-use/lib/useAsync';\n\n// todo: should this be a constant in a scaffolder package?\nconst SOURCE_TEMPLATE_ANNOTATION = 'backstage.io/source-template';\n\n/**\n * Returns the compound entity ref of the source template that was used to\n * create this entity (assuming that it still exists and the user has access\n * to it).\n */\nexport const useSourceTemplateCompoundEntityRef = (entity: Entity) => {\n const catalogApi = useApi(catalogApiRef);\n const { value: sourceTemplateRef } = useAsync(async () => {\n const refCandidate =\n entity.metadata.annotations?.[SOURCE_TEMPLATE_ANNOTATION];\n let compoundRefCandidate: CompoundEntityRef | undefined;\n\n if (!refCandidate) {\n return undefined;\n }\n\n try {\n // Check for access and that this template still exists.\n const template = await catalogApi.getEntityByRef(refCandidate);\n compoundRefCandidate = parseEntityRef(refCandidate);\n\n return template !== undefined ? compoundRefCandidate : undefined;\n } catch {\n return undefined;\n }\n }, [catalogApi, entity]);\n\n return sourceTemplateRef;\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 */\nimport {\n ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n CompoundEntityRef,\n DEFAULT_NAMESPACE,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n AppIcon,\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport React, { useCallback } from 'react';\nimport {\n ScmIntegrationIcon,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n alertApiRef,\n errorApiRef,\n useApi,\n useApp,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n getEntitySourceLocation,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { createFromTemplateRouteRef, viewTechDocRouteRef } from '../../routes';\n\nimport { AboutContent } from './AboutContent';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport CreateComponentIcon from '@material-ui/icons/AddCircleOutline';\nimport DocsIcon from '@material-ui/icons/Description';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { parseEntityRef } from '@backstage/catalog-model';\nimport { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';\nimport { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { useSourceTemplateCompoundEntityRef } from './hooks';\n\nconst TECHDOCS_ANNOTATION = 'backstage.io/techdocs-ref';\n\nconst TECHDOCS_EXTERNAL_ANNOTATION = 'backstage.io/techdocs-entity';\n\nconst useStyles = makeStyles({\n gridItemCard: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n },\n fullHeightCard: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItemCardContent: {\n flex: 1,\n },\n fullHeightCardContent: {\n flex: 1,\n },\n});\n\n/**\n * Props for {@link EntityAboutCard}.\n *\n * @public\n */\nexport interface AboutCardProps {\n variant?: InfoCardVariants;\n}\n\n/**\n * Exported publicly via the EntityAboutCard\n */\nexport function AboutCard(props: AboutCardProps) {\n const { variant } = props;\n const app = useApp();\n const classes = useStyles();\n const { entity } = useEntity();\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const errorApi = useApi(errorApiRef);\n const viewTechdocLink = useRouteRef(viewTechDocRouteRef);\n const templateRoute = useRouteRef(createFromTemplateRouteRef);\n const sourceTemplateRef = useSourceTemplateCompoundEntityRef(entity);\n const { allowed: canRefresh } = useEntityPermission(\n catalogEntityRefreshPermission,\n );\n\n const entitySourceLocation = getEntitySourceLocation(\n entity,\n scmIntegrationsApi,\n );\n const entityMetadataEditUrl =\n entity.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n let techdocsRef: CompoundEntityRef | undefined;\n\n if (entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) {\n try {\n techdocsRef = parseEntityRef(\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION],\n );\n // not a fan of this but we don't care if the parseEntityRef fails\n } catch {\n techdocsRef = undefined;\n }\n }\n\n const viewInSource: IconLinkVerticalProps = {\n label: 'View Source',\n disabled: !entitySourceLocation,\n icon: <ScmIntegrationIcon type={entitySourceLocation?.integrationType} />,\n href: entitySourceLocation?.locationTargetUrl,\n };\n const viewInTechDocs: IconLinkVerticalProps = {\n label: 'View TechDocs',\n disabled:\n !(\n entity.metadata.annotations?.[TECHDOCS_ANNOTATION] ||\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]\n ) || !viewTechdocLink,\n icon: <DocsIcon />,\n href:\n viewTechdocLink &&\n (techdocsRef\n ? viewTechdocLink({\n namespace: techdocsRef.namespace || DEFAULT_NAMESPACE,\n kind: techdocsRef.kind,\n name: techdocsRef.name,\n })\n : viewTechdocLink({\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n kind: entity.kind,\n name: entity.metadata.name,\n })),\n };\n\n const subHeaderLinks = [viewInSource, viewInTechDocs];\n\n if (isTemplateEntityV1beta3(entity)) {\n const Icon = app.getSystemIcon('scaffolder') ?? CreateComponentIcon;\n\n const launchTemplate: IconLinkVerticalProps = {\n label: 'Launch Template',\n icon: <Icon />,\n disabled: !templateRoute,\n href:\n templateRoute &&\n templateRoute({\n templateName: entity.metadata.name,\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n }),\n };\n\n subHeaderLinks.push(launchTemplate);\n }\n\n let cardClass = '';\n if (variant === 'gridItem') {\n cardClass = classes.gridItemCard;\n } else if (variant === 'fullHeight') {\n cardClass = classes.fullHeightCard;\n }\n\n let cardContentClass = '';\n if (variant === 'gridItem') {\n cardContentClass = classes.gridItemCardContent;\n } else if (variant === 'fullHeight') {\n cardContentClass = classes.fullHeightCardContent;\n }\n\n const entityLocation = entity.metadata.annotations?.[ANNOTATION_LOCATION];\n // Limiting the ability to manually refresh to the less expensive locations\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n const refreshEntity = useCallback(async () => {\n try {\n await catalogApi.refreshEntity(stringifyEntityRef(entity));\n alertApi.post({\n message: 'Refresh scheduled',\n severity: 'info',\n display: 'transient',\n });\n } catch (e) {\n errorApi.post(e);\n }\n }, [catalogApi, alertApi, errorApi, entity]);\n\n return (\n <Card className={cardClass}>\n <CardHeader\n title=\"About\"\n action={\n <>\n {allowRefresh && canRefresh && (\n <IconButton\n aria-label=\"Refresh\"\n title=\"Schedule entity refresh\"\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n <IconButton\n component={Link}\n aria-label=\"Edit\"\n disabled={!entityMetadataEditUrl}\n title=\"Edit Metadata\"\n to={entityMetadataEditUrl ?? '#'}\n >\n <EditIcon />\n </IconButton>\n {sourceTemplateRef && templateRoute && (\n <IconButton\n component={Link}\n title=\"Create something similar\"\n to={templateRoute({\n namespace: sourceTemplateRef.namespace,\n templateName: sourceTemplateRef.name,\n })}\n >\n <AppIcon id=\"scaffolder\" />\n </IconButton>\n )}\n </>\n }\n subheader={<HeaderIconLinkRow links={subHeaderLinks} />}\n />\n <Divider />\n <CardContent className={cardContentClass}>\n <AboutContent entity={entity} />\n </CardContent>\n </Card>\n );\n}\n"],"names":["useStyles","_a","getEntitySourceLocation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,WAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,KAAO,EAAA;AAAA,IACL,UAAY,EAAA,MAAA;AAAA,IACZ,QAAU,EAAA,QAAA;AAAA,IACV,UAAY,EAAA,MAAA;AAAA,IACZ,SAAW,EAAA,YAAA;AAAA,GACb;AAAA,EACA,KAAO,EAAA;AAAA,IACL,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,SAAA;AAAA,IAC1B,aAAe,EAAA,WAAA;AAAA,IACf,QAAU,EAAA,MAAA;AAAA,IACV,UAAY,EAAA,MAAA;AAAA,IACZ,aAAe,EAAA,GAAA;AAAA,IACf,QAAU,EAAA,QAAA;AAAA,IACV,UAAY,EAAA,QAAA;AAAA,GACd;AACF,CAAE,CAAA,CAAA,CAAA;AAeK,SAAS,WAAW,KAAwB,EAAA;AACjD,EAAA,MAAM,EAAE,KAAA,EAAO,KAAO,EAAA,SAAA,EAAW,UAAa,GAAA,KAAA,CAAA;AAC9C,EAAA,MAAM,UAA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,CAAA;AAAA,KAAA;AAAA,GAEvD,kBAAA,KAAA,CAAA,aAAA,CAAC,OAAQ,EAAA,IAAA,CAAA,kBACR,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAY,SAAW,EAAA,gBAAA,EAAA,kBACrB,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,EAAa,MAAgB,EAAA,CAChC,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -147,12 +147,22 @@ const columnFactories = Object.freeze({
|
|
|
147
147
|
};
|
|
148
148
|
},
|
|
149
149
|
createLabelColumn(key, options) {
|
|
150
|
+
function formatContent(keyLabel, entity) {
|
|
151
|
+
var _a;
|
|
152
|
+
const labels = (_a = entity.metadata) == null ? void 0 : _a.labels;
|
|
153
|
+
return labels && labels[keyLabel] || "";
|
|
154
|
+
}
|
|
150
155
|
return {
|
|
151
156
|
title: (options == null ? void 0 : options.title) || "Label",
|
|
152
157
|
field: "entity.metadata.labels",
|
|
153
158
|
cellStyle: {
|
|
154
159
|
padding: "0px 16px 0px 20px"
|
|
155
160
|
},
|
|
161
|
+
customSort({ entity: entity1 }, { entity: entity2 }) {
|
|
162
|
+
return formatContent(key, entity1).localeCompare(
|
|
163
|
+
formatContent(key, entity2)
|
|
164
|
+
);
|
|
165
|
+
},
|
|
156
166
|
render: ({ entity }) => {
|
|
157
167
|
var _a;
|
|
158
168
|
const labels = (_a = entity.metadata) == null ? void 0 : _a.labels;
|
|
@@ -439,4 +449,4 @@ function toEntityRow(entity) {
|
|
|
439
449
|
}
|
|
440
450
|
|
|
441
451
|
export { CatalogTable as C };
|
|
442
|
-
//# sourceMappingURL=CatalogTable-
|
|
452
|
+
//# sourceMappingURL=CatalogTable-B8071eCT.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CatalogTable-B8071eCT.esm.js","sources":["../../src/components/CatalogTable/columns.tsx","../../src/components/CatalogTable/CatalogTableToolbar.tsx","../../src/components/CatalogTable/PaginatedCatalogTable.tsx","../../src/components/CatalogTable/defaultCatalogTableColumnsFunc.tsx","../../src/components/CatalogTable/CatalogTable.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 */\nimport React from 'react';\nimport {\n humanizeEntityRef,\n EntityRefLink,\n EntityRefLinks,\n} from '@backstage/plugin-catalog-react';\nimport Chip from '@material-ui/core/Chip';\nimport { CatalogTableRow } from './types';\nimport { OverflowTooltip, TableColumn } from '@backstage/core-components';\nimport { Entity } from '@backstage/catalog-model';\nimport { JsonArray } from '@backstage/types';\n\n// The columnFactories symbol is not directly exported, but through the\n// CatalogTable.columns field.\n/** @public */\nexport const columnFactories = Object.freeze({\n createNameColumn(options?: {\n defaultKind?: string;\n }): TableColumn<CatalogTableRow> {\n function formatContent(entity: Entity): string {\n return (\n entity.metadata?.title ||\n humanizeEntityRef(entity, {\n defaultKind: options?.defaultKind,\n })\n );\n }\n\n return {\n title: 'Name',\n field: 'resolved.entityRef',\n highlight: true,\n customSort({ entity: entity1 }, { entity: entity2 }) {\n // TODO: We could implement this more efficiently by comparing field by field.\n // This has similar issues as above.\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: ({ entity }) => (\n <EntityRefLink\n entityRef={entity}\n defaultKind={options?.defaultKind || 'Component'}\n />\n ),\n };\n },\n createSystemColumn(): TableColumn<CatalogTableRow> {\n return {\n title: 'System',\n field: 'resolved.partOfSystemRelationTitle',\n render: ({ resolved }) => (\n <EntityRefLinks\n entityRefs={resolved.partOfSystemRelations}\n defaultKind=\"system\"\n />\n ),\n };\n },\n createOwnerColumn(): TableColumn<CatalogTableRow> {\n return {\n title: 'Owner',\n field: 'resolved.ownedByRelationsTitle',\n render: ({ resolved }) => (\n <EntityRefLinks\n entityRefs={resolved.ownedByRelations}\n defaultKind=\"group\"\n />\n ),\n };\n },\n createSpecTargetsColumn(): TableColumn<CatalogTableRow> {\n return {\n title: 'Targets',\n field: 'entity.spec.targets',\n customFilterAndSearch: (query, row) => {\n let targets: JsonArray = [];\n if (\n row.entity?.spec?.targets &&\n Array.isArray(row.entity?.spec?.targets)\n ) {\n targets = row.entity?.spec?.targets;\n } else if (row.entity?.spec?.target) {\n targets = [row.entity?.spec?.target];\n }\n return targets\n .join(', ')\n .toLocaleUpperCase('en-US')\n .includes(query.toLocaleUpperCase('en-US'));\n },\n render: ({ entity }) => (\n <>\n {(entity?.spec?.targets || entity?.spec?.target) && (\n <OverflowTooltip\n text={(\n (entity!.spec!.targets as JsonArray) || [entity.spec.target]\n ).join(', ')}\n placement=\"bottom-start\"\n />\n )}\n </>\n ),\n };\n },\n createSpecTypeColumn(\n options: {\n hidden: boolean;\n } = { hidden: false },\n ): TableColumn<CatalogTableRow> {\n return {\n title: 'Type',\n field: 'entity.spec.type',\n hidden: options.hidden,\n width: 'auto',\n };\n },\n createSpecLifecycleColumn(): TableColumn<CatalogTableRow> {\n return {\n title: 'Lifecycle',\n field: 'entity.spec.lifecycle',\n };\n },\n createMetadataDescriptionColumn(): TableColumn<CatalogTableRow> {\n return {\n title: 'Description',\n field: 'entity.metadata.description',\n render: ({ entity }) => (\n <OverflowTooltip\n text={entity.metadata.description}\n placement=\"bottom-start\"\n />\n ),\n width: 'auto',\n };\n },\n createTagsColumn(): TableColumn<CatalogTableRow> {\n return {\n title: 'Tags',\n field: 'entity.metadata.tags',\n cellStyle: {\n padding: '0px 16px 0px 20px',\n },\n render: ({ entity }) => (\n <>\n {entity.metadata.tags &&\n entity.metadata.tags.map(t => (\n <Chip\n key={t}\n label={t}\n size=\"small\"\n variant=\"outlined\"\n style={{ marginBottom: '0px' }}\n />\n ))}\n </>\n ),\n width: 'auto',\n };\n },\n createTitleColumn(options?: {\n hidden?: boolean;\n }): TableColumn<CatalogTableRow> {\n return {\n title: 'Title',\n field: 'entity.metadata.title',\n hidden: options?.hidden,\n searchable: true,\n };\n },\n createLabelColumn(\n key: string,\n options?: { title?: string; defaultValue?: string },\n ): TableColumn<CatalogTableRow> {\n function formatContent(keyLabel: string, entity: Entity): string {\n const labels: Record<string, string> | undefined =\n entity.metadata?.labels;\n return (labels && labels[keyLabel]) || '';\n }\n\n return {\n title: options?.title || 'Label',\n field: 'entity.metadata.labels',\n cellStyle: {\n padding: '0px 16px 0px 20px',\n },\n customSort({ entity: entity1 }, { entity: entity2 }) {\n return formatContent(key, entity1).localeCompare(\n formatContent(key, entity2),\n );\n },\n render: ({ entity }: { entity: Entity }) => {\n const labels: Record<string, string> | undefined =\n entity.metadata?.labels;\n const specifiedLabelValue =\n (labels && labels[key]) || options?.defaultValue;\n return (\n <>\n {specifiedLabelValue && (\n <Chip\n key={specifiedLabelValue}\n label={specifiedLabelValue}\n size=\"small\"\n variant=\"outlined\"\n />\n )}\n </>\n );\n },\n width: 'auto',\n };\n },\n createNamespaceColumn(): TableColumn<CatalogTableRow> {\n return {\n title: 'Namespace',\n field: 'entity.metadata.namespace',\n width: 'auto',\n };\n },\n});\n","/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { EntitySearchBar } from '@backstage/plugin-catalog-react';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useToolbarStyles = makeStyles(\n theme => ({\n root: {\n paddingTop: theme.spacing(1.25),\n paddingLeft: theme.spacing(2.5),\n paddingBottom: theme.spacing(0.75),\n display: 'flex',\n justifyContent: 'space-between',\n },\n text: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n }),\n { name: 'BackstageTableToolbar' },\n);\n\nexport function CatalogTableToolbar(props: {\n title?: string | React.ReactElement<any>;\n}) {\n const styles = useToolbarStyles();\n return (\n <Toolbar className={styles.root}>\n <Typography variant=\"h5\" className={styles.text}>\n {props.title}\n </Typography>\n <EntitySearchBar />\n </Toolbar>\n );\n}\n","/*\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 React from 'react';\n\nimport { Table, TableProps } from '@backstage/core-components';\nimport { CatalogTableRow } from './types';\nimport { CatalogTableToolbar } from './CatalogTableToolbar';\n\ntype PaginatedCatalogTableProps = {\n prev?(): void;\n next?(): void;\n} & TableProps<CatalogTableRow>;\n\n/**\n * @internal\n */\nexport function PaginatedCatalogTable(props: PaginatedCatalogTableProps) {\n const { columns, data, next, prev, title, isLoading, options } = props;\n\n return (\n <Table\n title={isLoading ? '' : title}\n columns={columns}\n data={data}\n options={{\n ...options,\n // These settings are configured to force server side pagination\n paginationPosition: 'both',\n pageSizeOptions: [],\n showFirstLastPageButtons: false,\n pageSize: Number.MAX_SAFE_INTEGER,\n emptyRowsWhenPaging: false,\n }}\n onPageChange={page => {\n if (page > 0) {\n next?.();\n } else {\n prev?.();\n }\n }}\n components={{\n Toolbar: CatalogTableToolbar,\n }}\n /* this will enable the prev button accordingly */\n page={prev ? 1 : 0}\n /* this will enable the next button accordingly */\n totalCount={next ? Number.MAX_VALUE : Number.MAX_SAFE_INTEGER}\n localization={{ pagination: { labelDisplayedRows: '' } }}\n />\n );\n}\n","/*\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 { TableColumn } from '@backstage/core-components';\nimport { columnFactories } from './columns';\nimport { CatalogTableColumnsFunc, CatalogTableRow } from './types';\n\n// The defaultCatalogTableColumnsFunc symbol is not directly exported, but through the\n// CatalogTable.defaultColumnsFunc field.\n/** @public */\nexport const defaultCatalogTableColumnsFunc: CatalogTableColumnsFunc = ({\n filters,\n entities,\n}) => {\n const showTypeColumn = filters.type === undefined;\n\n return [\n columnFactories.createTitleColumn({ hidden: true }),\n columnFactories.createNameColumn({ defaultKind: filters.kind?.value }),\n ...createEntitySpecificColumns(),\n columnFactories.createMetadataDescriptionColumn(),\n columnFactories.createTagsColumn(),\n ];\n\n function createEntitySpecificColumns(): TableColumn<CatalogTableRow>[] {\n const baseColumns = [\n columnFactories.createSystemColumn(),\n columnFactories.createOwnerColumn(),\n columnFactories.createSpecTypeColumn({ hidden: !showTypeColumn }),\n columnFactories.createSpecLifecycleColumn(),\n ];\n switch (filters.kind?.value) {\n case 'user':\n return [];\n case 'domain':\n case 'system':\n return [columnFactories.createOwnerColumn()];\n case 'group':\n case 'template':\n return [\n columnFactories.createSpecTypeColumn({ hidden: !showTypeColumn }),\n ];\n case 'location':\n return [\n columnFactories.createSpecTypeColumn({ hidden: !showTypeColumn }),\n columnFactories.createSpecTargetsColumn(),\n ];\n default:\n return entities.every(entity => entity.metadata.namespace === 'default')\n ? baseColumns\n : [...baseColumns, columnFactories.createNamespaceColumn()];\n }\n }\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ANNOTATION_EDIT_URL,\n ANNOTATION_VIEW_URL,\n Entity,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n CodeSnippet,\n Table,\n TableColumn,\n TableProps,\n WarningPanel,\n} from '@backstage/core-components';\nimport {\n getEntityRelations,\n humanizeEntityRef,\n useEntityList,\n useStarredEntities,\n} from '@backstage/plugin-catalog-react';\nimport Typography from '@material-ui/core/Typography';\nimport { withStyles } from '@material-ui/core/styles';\nimport { visuallyHidden } from '@mui/utils';\nimport Edit from '@material-ui/icons/Edit';\nimport OpenInNew from '@material-ui/icons/OpenInNew';\nimport Star from '@material-ui/icons/Star';\nimport StarBorder from '@material-ui/icons/StarBorder';\nimport { capitalize } from 'lodash';\nimport pluralize from 'pluralize';\nimport React, { ReactNode, useMemo } from 'react';\nimport { columnFactories } from './columns';\nimport { CatalogTableColumnsFunc, CatalogTableRow } from './types';\nimport { PaginatedCatalogTable } from './PaginatedCatalogTable';\nimport { defaultCatalogTableColumnsFunc } from './defaultCatalogTableColumnsFunc';\n\n/**\n * Props for {@link CatalogTable}.\n *\n * @public\n */\nexport interface CatalogTableProps {\n columns?: TableColumn<CatalogTableRow>[] | CatalogTableColumnsFunc;\n actions?: TableProps<CatalogTableRow>['actions'];\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n subtitle?: string;\n}\n\nconst YellowStar = withStyles({\n root: {\n color: '#f3ba37',\n },\n})(Star);\n\nconst refCompare = (a: Entity, b: Entity) => {\n const toRef = (entity: Entity) =>\n entity.metadata.title ||\n humanizeEntityRef(entity, {\n defaultKind: 'Component',\n });\n\n return toRef(a).localeCompare(toRef(b));\n};\n\n/** @public */\nexport const CatalogTable = (props: CatalogTableProps) => {\n const {\n columns = defaultCatalogTableColumnsFunc,\n tableOptions,\n subtitle,\n emptyContent,\n } = props;\n const { isStarredEntity, toggleStarredEntity } = useStarredEntities();\n const entityListContext = useEntityList();\n const { loading, error, entities, filters, pageInfo, totalItems } =\n entityListContext;\n const enablePagination = !!pageInfo;\n\n const tableColumns = useMemo(\n () =>\n typeof columns === 'function' ? columns(entityListContext) : columns,\n [columns, entityListContext],\n );\n\n if (error) {\n return (\n <div>\n <WarningPanel\n severity=\"error\"\n title=\"Could not fetch catalog entities.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </div>\n );\n }\n\n const defaultActions: TableProps<CatalogTableRow>['actions'] = [\n ({ entity }) => {\n const url = entity.metadata.annotations?.[ANNOTATION_VIEW_URL];\n const title = 'View';\n\n return {\n icon: () => (\n <>\n <Typography style={visuallyHidden}>{title}</Typography>\n <OpenInNew fontSize=\"small\" />\n </>\n ),\n tooltip: title,\n disabled: !url,\n onClick: () => {\n if (!url) return;\n window.open(url, '_blank');\n },\n };\n },\n ({ entity }) => {\n const url = entity.metadata.annotations?.[ANNOTATION_EDIT_URL];\n const title = 'Edit';\n\n return {\n icon: () => (\n <>\n <Typography style={visuallyHidden}>{title}</Typography>\n <Edit fontSize=\"small\" />\n </>\n ),\n tooltip: title,\n disabled: !url,\n onClick: () => {\n if (!url) return;\n window.open(url, '_blank');\n },\n };\n },\n ({ entity }) => {\n const isStarred = isStarredEntity(entity);\n const title = isStarred ? 'Remove from favorites' : 'Add to favorites';\n\n return {\n cellStyle: { paddingLeft: '1em' },\n icon: () => (\n <>\n <Typography style={visuallyHidden}>{title}</Typography>\n {isStarred ? <YellowStar /> : <StarBorder />}\n </>\n ),\n tooltip: title,\n onClick: () => toggleStarredEntity(entity),\n };\n },\n ];\n\n const currentKind = filters.kind?.value || '';\n const currentType = filters.type?.value || '';\n // TODO(timbonicus): remove the title from the CatalogTable once using EntitySearchBar\n const titlePreamble = capitalize(filters.user?.value ?? 'all');\n const titleDisplay = [titlePreamble, currentType, pluralize(currentKind)]\n .filter(s => s)\n .join(' ');\n\n const title = `${titleDisplay} (${totalItems})`;\n const actions = props.actions || defaultActions;\n const options = {\n actionsColumnIndex: -1,\n loadingType: 'linear' as const,\n showEmptyDataSourceMessage: !loading,\n padding: 'dense' as const,\n ...tableOptions,\n };\n\n if (enablePagination) {\n return (\n <PaginatedCatalogTable\n columns={tableColumns}\n emptyContent={emptyContent}\n isLoading={loading}\n title={titleDisplay}\n actions={actions}\n subtitle={subtitle}\n options={options}\n data={entities.map(toEntityRow)}\n next={pageInfo.next}\n prev={pageInfo.prev}\n />\n );\n }\n\n const rows = entities.sort(refCompare).map(toEntityRow);\n const pageSize = 20;\n const showPagination = rows.length > pageSize;\n\n return (\n <Table<CatalogTableRow>\n isLoading={loading}\n columns={tableColumns}\n options={{\n paging: showPagination,\n pageSize: pageSize,\n pageSizeOptions: [20, 50, 100],\n ...options,\n }}\n title={title}\n data={rows}\n actions={actions}\n subtitle={subtitle}\n emptyContent={emptyContent}\n />\n );\n};\n\nCatalogTable.columns = columnFactories;\nCatalogTable.defaultColumnsFunc = defaultCatalogTableColumnsFunc;\n\nfunction toEntityRow(entity: Entity) {\n const partOfSystemRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'system',\n });\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n\n return {\n entity,\n resolved: {\n // This name is here for backwards compatibility mostly; the\n // presentation of refs in the table should in general be handled with\n // EntityRefLink / EntityName components\n name: humanizeEntityRef(entity, {\n defaultKind: 'Component',\n }),\n entityRef: stringifyEntityRef(entity),\n ownedByRelationsTitle: ownedByRelations\n .map(r => humanizeEntityRef(r, { defaultKind: 'group' }))\n .join(', '),\n ownedByRelations,\n partOfSystemRelationTitle: partOfSystemRelations\n .map(r =>\n humanizeEntityRef(r, {\n defaultKind: 'system',\n }),\n )\n .join(', '),\n partOfSystemRelations,\n },\n };\n}\n"],"names":["_a","title","Edit"],"mappings":";;;;;;;;;;;;;;;;AA8Ba,MAAA,eAAA,GAAkB,OAAO,MAAO,CAAA;AAAA,EAC3C,iBAAiB,OAEgB,EAAA;AAC/B,IAAA,SAAS,cAAc,MAAwB,EAAA;AAlCnD,MAAA,IAAA,EAAA,CAAA;AAmCM,MAAA,OAAA,CAAA,CACE,EAAO,GAAA,MAAA,CAAA,QAAA,KAAP,IAAiB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KACjB,kBAAkB,MAAQ,EAAA;AAAA,QACxB,aAAa,OAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,WAAA;AAAA,OACvB,CAAA,CAAA;AAAA,KAEL;AAEA,IAAO,OAAA;AAAA,MACL,KAAO,EAAA,MAAA;AAAA,MACP,KAAO,EAAA,oBAAA;AAAA,MACP,SAAW,EAAA,IAAA;AAAA,MACX,UAAA,CAAW,EAAE,MAAQ,EAAA,OAAA,IAAW,EAAE,MAAA,EAAQ,SAAW,EAAA;AAGnD,QAAA,OAAO,cAAc,OAAO,CAAA,CAAE,aAAc,CAAA,aAAA,CAAc,OAAO,CAAC,CAAA,CAAA;AAAA,OACpE;AAAA,MACA,MAAQ,EAAA,CAAC,EAAE,MAAA,EACT,qBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,aAAA;AAAA,QAAA;AAAA,UACC,SAAW,EAAA,MAAA;AAAA,UACX,WAAA,EAAA,CAAa,mCAAS,WAAe,KAAA,WAAA;AAAA,SAAA;AAAA,OACvC;AAAA,KAEJ,CAAA;AAAA,GACF;AAAA,EACA,kBAAmD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A;AAAA,UACnB,WAAa,EAAA,QAAA;AAAA,SACd,CAAA;AAAA,OACH,CACC,KAAK,IAAI,CAAA;AAAA,MACZ,qBAAA;AAAA,KACF;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { F as FilterWrapper } from './alpha-
|
|
4
|
+
import { F as FilterWrapper } from './alpha-DpxXch-c.esm.js';
|
|
5
5
|
import { E as EntitySwitch, i as isOrphan, a as EntityOrphanWarning, h as hasRelationWarnings, b as EntityRelationWarning, c as hasCatalogProcessingErrors, d as EntityProcessingErrorsPanel } from './EntitySwitch-D82_YYhG.esm.js';
|
|
6
6
|
import '@backstage/core-compat-api';
|
|
7
7
|
import '@backstage/frontend-plugin-api';
|
|
@@ -46,4 +46,4 @@ function EntityOverviewPage(props) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export { EntityOverviewPage };
|
|
49
|
-
//# sourceMappingURL=EntityOverviewPage-
|
|
49
|
+
//# sourceMappingURL=EntityOverviewPage-BrKzcB2g.esm.js.map
|
package/dist/esm/{EntityOverviewPage-Bzd86gsX.esm.js.map → EntityOverviewPage-BrKzcB2g.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityOverviewPage-
|
|
1
|
+
{"version":3,"file":"EntityOverviewPage-BrKzcB2g.esm.js","sources":["../../src/alpha/EntityOverviewPage.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 { Entity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport Grid from '@material-ui/core/Grid';\nimport React from 'react';\nimport { FilterWrapper } from './filter/FilterWrapper';\nimport { EntitySwitch } from '../components/EntitySwitch';\nimport {\n EntityOrphanWarning,\n isOrphan,\n} from '../components/EntityOrphanWarning';\nimport {\n EntityRelationWarning,\n hasRelationWarnings,\n} from '../components/EntityRelationWarning';\nimport {\n EntityProcessingErrorsPanel,\n hasCatalogProcessingErrors,\n} from '../components/EntityProcessingErrorsPanel';\n\ninterface EntityOverviewPageProps {\n cards: Array<{\n element: React.JSX.Element;\n filterFunction?: (entity: Entity) => boolean;\n filterExpression?: string;\n }>;\n}\n\nconst entityWarningContent = (\n <>\n <EntitySwitch>\n <EntitySwitch.Case if={isOrphan}>\n <Grid item xs={12}>\n <EntityOrphanWarning />\n </Grid>\n </EntitySwitch.Case>\n </EntitySwitch>\n\n <EntitySwitch>\n <EntitySwitch.Case if={hasRelationWarnings}>\n <Grid item xs={12}>\n <EntityRelationWarning />\n </Grid>\n </EntitySwitch.Case>\n </EntitySwitch>\n\n <EntitySwitch>\n <EntitySwitch.Case if={hasCatalogProcessingErrors}>\n <Grid item xs={12}>\n <EntityProcessingErrorsPanel />\n </Grid>\n </EntitySwitch.Case>\n </EntitySwitch>\n </>\n);\n\nexport function EntityOverviewPage(props: EntityOverviewPageProps) {\n const { entity } = useEntity();\n return (\n <Grid container spacing={3} alignItems=\"stretch\">\n {entityWarningContent}\n {props.cards.map((card, index) => (\n <FilterWrapper key={index} entity={entity} {...card} />\n ))}\n </Grid>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,oBACJ,mBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBACG,KAAA,CAAA,aAAA,CAAA,YA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A,EAAK,OAAO,MAAiB,EAAA,GAAG,IAAM,EAAA,CACtD,CACH,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { convertLegacyRouteRef, compatWrapper, convertLegacyRouteRefs } from '@backstage/core-compat-api';
|
|
2
2
|
import { createApiExtension, createPageExtension, createExtensionInput, coreExtensionData, createExtension, ExtensionBoundary, createSchemaFromZod, createNavItemExtension, createPlugin } from '@backstage/frontend-plugin-api';
|
|
3
|
-
import { catalogApiRef, starredEntitiesApiRef, entityRouteRef, AsyncEntityProvider } from '@backstage/plugin-catalog-react';
|
|
4
|
-
import { D as DefaultStarredEntitiesApi, r as rootRouteRef, v as viewTechDocRouteRef, c as createComponentRouteRef, a as createFromTemplateRouteRef, u as unregisterRedirectRouteRef } from './routes-D5H5grpG.esm.js';
|
|
3
|
+
import { catalogApiRef, starredEntitiesApiRef, entityPresentationApiRef, entityRouteRef, AsyncEntityProvider } from '@backstage/plugin-catalog-react';
|
|
4
|
+
import { D as DefaultStarredEntitiesApi, b as DefaultEntityPresentationApi, r as rootRouteRef, v as viewTechDocRouteRef, c as createComponentRouteRef, a as createFromTemplateRouteRef, u as unregisterRedirectRouteRef } from './routes-D5H5grpG.esm.js';
|
|
5
5
|
import { createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef } from '@backstage/core-plugin-api';
|
|
6
6
|
import { CatalogClient } from '@backstage/catalog-client';
|
|
7
7
|
import React, { useMemo, lazy } from 'react';
|
|
@@ -29,7 +29,14 @@ const catalogStarredEntitiesApi = createApiExtension({
|
|
|
29
29
|
factory: ({ storageApi }) => new DefaultStarredEntitiesApi({ storageApi })
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
const entityPresentationApi = createApiExtension({
|
|
33
|
+
factory: createApiFactory({
|
|
34
|
+
api: entityPresentationApiRef,
|
|
35
|
+
deps: { catalogApiImp: catalogApiRef },
|
|
36
|
+
factory: ({ catalogApiImp }) => DefaultEntityPresentationApi.create({ catalogApi: catalogApiImp })
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
var apis = [catalogApi, catalogStarredEntitiesApi, entityPresentationApi];
|
|
33
40
|
|
|
34
41
|
function createKindMatcher(parameters, _onParseError) {
|
|
35
42
|
const items = parameters.map((p) => p.toLocaleLowerCase("en-US"));
|
|
@@ -199,7 +206,7 @@ const catalogPage = createPageExtension({
|
|
|
199
206
|
})
|
|
200
207
|
},
|
|
201
208
|
loader: async ({ inputs }) => {
|
|
202
|
-
const { BaseCatalogPage } = await import('./index-
|
|
209
|
+
const { BaseCatalogPage } = await import('./index-B9rsO45f.esm.js');
|
|
203
210
|
const filters = inputs.filters.map((filter) => filter.output.element);
|
|
204
211
|
return compatWrapper(/* @__PURE__ */ React.createElement(BaseCatalogPage, { filters: /* @__PURE__ */ React.createElement(React.Fragment, null, filters) }));
|
|
205
212
|
}
|
|
@@ -354,7 +361,7 @@ var navItems = [catalogNavItem];
|
|
|
354
361
|
|
|
355
362
|
const catalogAboutEntityCard = createEntityCardExtension({
|
|
356
363
|
name: "about",
|
|
357
|
-
loader: async () => import('./index-
|
|
364
|
+
loader: async () => import('./index-CTye7k-V.esm.js').then(
|
|
358
365
|
(m) => compatWrapper(/* @__PURE__ */ React.createElement(m.AboutCard, { variant: "gridItem" }))
|
|
359
366
|
)
|
|
360
367
|
});
|
|
@@ -432,7 +439,7 @@ const catalogOverviewEntityContent = createEntityContentExtension({
|
|
|
432
439
|
filterExpression: catalogExtensionData.entityFilterExpression.optional()
|
|
433
440
|
})
|
|
434
441
|
},
|
|
435
|
-
loader: async ({ inputs }) => import('./EntityOverviewPage-
|
|
442
|
+
loader: async ({ inputs }) => import('./EntityOverviewPage-BrKzcB2g.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.EntityOverviewPage, { cards: inputs.cards.map((c) => c.output) }))
|
|
436
443
|
});
|
|
437
444
|
var entityContents = [catalogOverviewEntityContent];
|
|
438
445
|
|
|
@@ -468,4 +475,4 @@ var plugin = createPlugin({
|
|
|
468
475
|
});
|
|
469
476
|
|
|
470
477
|
export { FilterWrapper as F, createCatalogFilterExtension as c, plugin as p };
|
|
471
|
-
//# sourceMappingURL=alpha-
|
|
478
|
+
//# sourceMappingURL=alpha-DpxXch-c.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alpha-DpxXch-c.esm.js","sources":["../../src/alpha/apis.tsx","../../src/alpha/filter/matrchers/createKindMatcher.ts","../../src/alpha/filter/matrchers/createTypeMatcher.ts","../../src/alpha/filter/matrchers/createIsMatcher.ts","../../src/alpha/filter/matrchers/createHasMatcher.ts","../../src/alpha/filter/parseFilterExpression.ts","../../src/alpha/filter/FilterWrapper.tsx","../../src/alpha/pages.tsx","../../src/alpha/createCatalogFilterExtension.tsx","../../src/alpha/filters.tsx","../../src/alpha/navItems.tsx","../../src/alpha/entityCards.tsx","../../src/alpha/entityContents.tsx","../../src/alpha/searchResultItems.tsx","../../src/alpha/plugin.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 {\n createApiFactory,\n discoveryApiRef,\n fetchApiRef,\n storageApiRef,\n} from '@backstage/core-plugin-api';\nimport { CatalogClient } from '@backstage/catalog-client';\nimport { createApiExtension } from '@backstage/frontend-plugin-api';\nimport {\n catalogApiRef,\n entityPresentationApiRef,\n starredEntitiesApiRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n DefaultEntityPresentationApi,\n DefaultStarredEntitiesApi,\n} from '../apis';\n\nexport const catalogApi = createApiExtension({\n factory: createApiFactory({\n api: catalogApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogClient({ discoveryApi, fetchApi }),\n }),\n});\n\nexport const catalogStarredEntitiesApi = createApiExtension({\n factory: createApiFactory({\n api: starredEntitiesApiRef,\n deps: { storageApi: storageApiRef },\n factory: ({ storageApi }) => new DefaultStarredEntitiesApi({ storageApi }),\n }),\n});\n\nexport const entityPresentationApi = createApiExtension({\n factory: createApiFactory({\n api: entityPresentationApiRef,\n deps: { catalogApiImp: catalogApiRef },\n factory: ({ catalogApiImp }) =>\n DefaultEntityPresentationApi.create({ catalogApi: catalogApiImp }),\n }),\n});\n\nexport default [catalogApi, catalogStarredEntitiesApi, entityPresentationApi];\n","/*\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 { EntityMatcherFn } from './types';\n\n/**\n * Matches on kind\n */\nexport function createKindMatcher(\n parameters: string[],\n _onParseError: (error: Error) => void,\n): EntityMatcherFn {\n const items = parameters.map(p => p.toLocaleLowerCase('en-US'));\n return entity => items.includes(entity.kind.toLocaleLowerCase('en-US'));\n}\n","/*\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 { EntityMatcherFn } from './types';\n\n/**\n * Matches on spec.type\n */\nexport function createTypeMatcher(\n parameters: string[],\n _onParseError: (error: Error) => void,\n): EntityMatcherFn {\n const items = parameters.map(p => p.toLocaleLowerCase('en-US'));\n return entity => {\n const value = entity.spec?.type;\n return (\n typeof value === 'string' &&\n items.includes(value.toLocaleLowerCase('en-US'))\n );\n };\n}\n","/*\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 { InputError } from '@backstage/errors';\nimport { EntityMatcherFn } from './types';\n\nconst allowedMatchers: Record<string, EntityMatcherFn> = {\n orphan: entity =>\n Boolean(entity.metadata.annotations?.['backstage.io/orphan']),\n};\n\n/**\n * Matches on different semantic properties of the entity\n */\nexport function createIsMatcher(\n parameters: string[],\n onParseError: (error: Error) => void,\n): EntityMatcherFn {\n const matchers = parameters.flatMap(parameter => {\n const matcher = allowedMatchers[parameter.toLocaleLowerCase('en-US')];\n if (!matcher) {\n const known = Object.keys(allowedMatchers).map(m => `'${m}'`);\n onParseError(\n new InputError(\n `'${parameter}' is not a valid parameter for 'is' filter expressions, expected one of ${known}`,\n ),\n );\n return [];\n }\n return [matcher];\n });\n\n return entity =>\n matchers.length ? matchers.some(matcher => matcher(entity)) : true;\n}\n","/*\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 { InputError } from '@backstage/errors';\nimport { EntityMatcherFn } from './types';\n\nconst allowedMatchers: Record<string, EntityMatcherFn> = {\n labels: entity => {\n return Object.keys(entity.metadata.labels ?? {}).length > 0;\n },\n links: entity => {\n return (entity.metadata.links ?? []).length > 0;\n },\n};\n\n/**\n * Matches on the non-empty presence of different parts of the entity\n */\nexport function createHasMatcher(\n parameters: string[],\n onParseError: (error: Error) => void,\n): EntityMatcherFn {\n const matchers = parameters.flatMap(parameter => {\n const matcher = allowedMatchers[parameter.toLocaleLowerCase('en-US')];\n if (!matcher) {\n const known = Object.keys(allowedMatchers).map(m => `'${m}'`);\n onParseError(\n new InputError(\n `'${parameter}' is not a valid parameter for 'has' filter expressions, expected one of ${known}`,\n ),\n );\n return [];\n }\n return [matcher];\n });\n\n return entity =>\n matchers.length ? matchers.some(matcher => matcher(entity)) : true;\n}\n","/*\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 { Entity } from '@backstage/catalog-model';\nimport { InputError } from '@backstage/errors';\nimport { EntityMatcherFn } from './matrchers/types';\nimport { createKindMatcher } from './matrchers/createKindMatcher';\nimport { createTypeMatcher } from './matrchers/createTypeMatcher';\nimport { createIsMatcher } from './matrchers/createIsMatcher';\nimport { createHasMatcher } from './matrchers/createHasMatcher';\n\nconst rootMatcherFactories: Record<\n string,\n (\n parameters: string[],\n onParseError: (error: Error) => void,\n ) => EntityMatcherFn\n> = {\n kind: createKindMatcher,\n type: createTypeMatcher,\n is: createIsMatcher,\n has: createHasMatcher,\n};\n\n/**\n * Parses a filter expression that decides whether to render an entity component\n * or not. Returns a function that matches entities based on that expression.\n *\n * @remarks\n *\n * Filter strings are on the form `kind:user,group is:orphan`. There's\n * effectively an AND between the space separated parts, and an OR between comma\n * separated parameters. So the example filter string semantically means\n * \"entities that are of either User or Group kind, and also are orphans\".\n *\n * The `expressionParseErrors` array contains any errors that were encountered\n * during initial parsing of the expression. Note that the parts of the input\n * expression that had errors are ignored entirely and parsing continues as if\n * they didn't exist.\n */\nexport function parseFilterExpression(expression: string): {\n filterFn: (entity: Entity) => boolean;\n expressionParseErrors: Error[];\n} {\n const expressionParseErrors: Error[] = [];\n\n const parts = splitFilterExpression(expression, e =>\n expressionParseErrors.push(e),\n );\n\n const matchers = parts.flatMap(part => {\n const factory = rootMatcherFactories[part.key];\n if (!factory) {\n const known = Object.keys(rootMatcherFactories).map(m => `'${m}'`);\n expressionParseErrors.push(\n new InputError(\n `'${part.key}' is not a valid filter expression key, expected one of ${known}`,\n ),\n );\n return [];\n }\n\n const matcher = factory(part.parameters, e =>\n expressionParseErrors.push(e),\n );\n return [matcher];\n });\n\n const filterFn = (entity: Entity) =>\n matchers.every(matcher => {\n try {\n return matcher(entity);\n } catch {\n return false;\n }\n });\n\n return {\n filterFn,\n expressionParseErrors,\n };\n}\n\nexport function splitFilterExpression(\n expression: string,\n onParseError: (error: Error) => void,\n): Array<{ key: string; parameters: string[] }> {\n const words = expression\n .split(' ')\n .map(w => w.trim())\n .filter(Boolean);\n\n const result = new Array<{ key: string; parameters: string[] }>();\n\n for (const word of words) {\n const match = word.match(/^([^:]+):(.+)$/);\n if (!match) {\n onParseError(\n new InputError(\n `'${word}' is not a valid filter expression, expected 'key:parameter' form`,\n ),\n );\n continue;\n }\n\n const key = match[1];\n const parameters = match[2].split(',').filter(Boolean); // silently ignore double commas\n\n result.push({ key, parameters });\n }\n\n return result;\n}\n","/*\n * Copyright 2024 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 Grid from '@material-ui/core/Grid';\nimport React, { useMemo } from 'react';\nimport { parseFilterExpression } from './parseFilterExpression';\n\n// Keeps track of what filter expression strings that we've seen duplicates of\n// with functions, or which emitted parsing errors for so far\nconst seenParseErrorExpressionStrings = new Set<string>();\nconst seenDuplicateExpressionStrings = new Set<string>();\n\n// Given an optional filter function and an optional filter expression, make\n// sure that at most one of them was given, and return a filter function that\n// does the right thing.\nexport function buildFilterFn(\n filterFunction?: (entity: Entity) => boolean,\n filterExpression?: string,\n): (entity: Entity) => boolean {\n if (\n filterFunction &&\n filterExpression &&\n !seenDuplicateExpressionStrings.has(filterExpression)\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n `Duplicate entity filter methods found, both '${filterExpression}' as well as a callback function, which is not permitted - using the callback`,\n );\n seenDuplicateExpressionStrings.add(filterExpression);\n }\n\n const filter = filterFunction || filterExpression;\n if (!filter) {\n return () => true;\n } else if (typeof filter === 'function') {\n return subject => filter(subject);\n }\n\n const result = parseFilterExpression(filter);\n if (\n result.expressionParseErrors.length &&\n !seenParseErrorExpressionStrings.has(filter)\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n `Error(s) in entity filter expression '${filter}'`,\n result.expressionParseErrors,\n );\n seenParseErrorExpressionStrings.add(filter);\n }\n\n return result.filterFn;\n}\n\n// Handles the memoized parsing of filter expressions\nexport function FilterWrapper(props: {\n entity: Entity;\n element: React.JSX.Element;\n filterFunction?: (entity: Entity) => boolean;\n filterExpression?: string;\n}) {\n const { entity, element, filterFunction, filterExpression } = props;\n\n const filterFn = useMemo(\n () => buildFilterFn(filterFunction, filterExpression),\n [filterFunction, filterExpression],\n );\n\n return filterFn(entity) ? (\n <Grid item md={6} xs={12}>\n {element}\n </Grid>\n ) : null;\n}\n","/*\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 React from 'react';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n createPageExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport {\n AsyncEntityProvider,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { catalogExtensionData } from '@backstage/plugin-catalog-react/alpha';\nimport { rootRouteRef } from '../routes';\nimport { useEntityFromUrl } from '../components/CatalogEntityPage/useEntityFromUrl';\nimport { buildFilterFn } from './filter/FilterWrapper';\n\nexport const catalogPage = createPageExtension({\n defaultPath: '/catalog',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n inputs: {\n filters: createExtensionInput({\n element: coreExtensionData.reactElement,\n }),\n },\n loader: async ({ inputs }) => {\n const { BaseCatalogPage } = await import('../components/CatalogPage');\n const filters = inputs.filters.map(filter => filter.output.element);\n return compatWrapper(<BaseCatalogPage filters={<>{filters}</>} />);\n },\n});\n\nexport const catalogEntityPage = createPageExtension({\n name: 'entity',\n defaultPath: '/catalog/:namespace/:kind/:name',\n routeRef: convertLegacyRouteRef(entityRouteRef),\n inputs: {\n contents: createExtensionInput({\n element: coreExtensionData.reactElement,\n path: coreExtensionData.routePath,\n routeRef: coreExtensionData.routeRef.optional(),\n title: catalogExtensionData.entityContentTitle,\n filterFunction: catalogExtensionData.entityFilterFunction.optional(),\n filterExpression: catalogExtensionData.entityFilterExpression.optional(),\n }),\n },\n loader: async ({ inputs }) => {\n const { EntityLayout } = await import('../components/EntityLayout');\n const Component = () => {\n return (\n <AsyncEntityProvider {...useEntityFromUrl()}>\n <EntityLayout>\n {inputs.contents.map(({ output }) => (\n <EntityLayout.Route\n key={output.path}\n path={output.path}\n title={output.title}\n if={buildFilterFn(\n output.filterFunction,\n output.filterExpression,\n )}\n >\n {output.element}\n </EntityLayout.Route>\n ))}\n </EntityLayout>\n </AsyncEntityProvider>\n );\n };\n return compatWrapper(<Component />);\n },\n});\n\nexport default [catalogPage, catalogEntityPage];\n","/*\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 React, { lazy } from 'react';\nimport {\n AnyExtensionInputMap,\n ExtensionBoundary,\n PortableSchema,\n coreExtensionData,\n createExtension,\n} from '@backstage/frontend-plugin-api';\n\n/** @alpha */\nexport function createCatalogFilterExtension<\n TInputs extends AnyExtensionInputMap,\n TConfig = never,\n>(options: {\n namespace?: string;\n name?: string;\n inputs?: TInputs;\n configSchema?: PortableSchema<TConfig>;\n loader: (options: { config: TConfig }) => Promise<JSX.Element>;\n}) {\n return createExtension({\n kind: 'catalog-filter',\n namespace: options.namespace,\n name: options.name,\n attachTo: { id: 'page:catalog', input: 'filters' },\n inputs: options.inputs ?? {},\n configSchema: options.configSchema,\n output: {\n element: coreExtensionData.reactElement,\n },\n factory({ config, node }) {\n const ExtensionComponent = lazy(() =>\n options\n .loader({ config })\n .then(element => ({ default: () => element })),\n );\n\n return {\n element: (\n <ExtensionBoundary node={node}>\n <ExtensionComponent />\n </ExtensionBoundary>\n ),\n };\n },\n });\n}\n","/*\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 React from 'react';\nimport { createCatalogFilterExtension } from './createCatalogFilterExtension';\nimport { createSchemaFromZod } from '@backstage/frontend-plugin-api';\n\nconst catalogTagCatalogFilter = createCatalogFilterExtension({\n name: 'tag',\n loader: async () => {\n const { EntityTagPicker } = await import('@backstage/plugin-catalog-react');\n return <EntityTagPicker />;\n },\n});\n\nconst catalogKindCatalogFilter = createCatalogFilterExtension({\n name: 'kind',\n configSchema: createSchemaFromZod(z =>\n z.object({\n initialFilter: z.string().default('component'),\n }),\n ),\n loader: async ({ config }) => {\n const { EntityKindPicker } = await import(\n '@backstage/plugin-catalog-react'\n );\n return <EntityKindPicker initialFilter={config.initialFilter} />;\n },\n});\n\nconst catalogTypeCatalogFilter = createCatalogFilterExtension({\n name: 'type',\n loader: async () => {\n const { EntityTypePicker } = await import(\n '@backstage/plugin-catalog-react'\n );\n return <EntityTypePicker />;\n },\n});\n\nconst catalogModeCatalogFilter = createCatalogFilterExtension({\n name: 'mode',\n configSchema: createSchemaFromZod(z =>\n z.object({\n mode: z.enum(['owners-only', 'all']).optional(),\n }),\n ),\n loader: async ({ config }) => {\n const { EntityOwnerPicker } = await import(\n '@backstage/plugin-catalog-react'\n );\n return <EntityOwnerPicker mode={config.mode} />;\n },\n});\n\nconst catalogNamespaceCatalogFilter = createCatalogFilterExtension({\n name: 'namespace',\n loader: async () => {\n const { EntityNamespacePicker } = await import(\n '@backstage/plugin-catalog-react'\n );\n return <EntityNamespacePicker />;\n },\n});\n\nconst catalogLifecycleCatalogFilter = createCatalogFilterExtension({\n name: 'lifecycle',\n loader: async () => {\n const { EntityLifecyclePicker } = await import(\n '@backstage/plugin-catalog-react'\n );\n return <EntityLifecyclePicker />;\n },\n});\n\nconst catalogProcessingStatusCatalogFilter = createCatalogFilterExtension({\n name: 'processing-status',\n loader: async () => {\n const { EntityProcessingStatusPicker } = await import(\n '@backstage/plugin-catalog-react'\n );\n return <EntityProcessingStatusPicker />;\n },\n});\n\nconst catalogListCatalogFilter = createCatalogFilterExtension({\n name: 'list',\n configSchema: createSchemaFromZod(z =>\n z.object({\n initialFilter: z.enum(['owned', 'starred', 'all']).default('owned'),\n }),\n ),\n loader: async ({ config }) => {\n const { UserListPicker } = await import('@backstage/plugin-catalog-react');\n return <UserListPicker initialFilter={config.initialFilter} />;\n },\n});\n\nexport default [\n catalogTagCatalogFilter,\n catalogKindCatalogFilter,\n catalogTypeCatalogFilter,\n catalogModeCatalogFilter,\n catalogNamespaceCatalogFilter,\n catalogLifecycleCatalogFilter,\n catalogProcessingStatusCatalogFilter,\n catalogListCatalogFilter,\n];\n","/*\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 HomeIcon from '@material-ui/icons/Home';\nimport { convertLegacyRouteRef } from '@backstage/core-compat-api';\nimport { createNavItemExtension } from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from '../routes';\n\nexport const catalogNavItem = createNavItemExtension({\n routeRef: convertLegacyRouteRef(rootRouteRef),\n title: 'Catalog',\n icon: HomeIcon,\n});\n\nexport default [catalogNavItem];\n","/*\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 React from 'react';\nimport { createEntityCardExtension } from '@backstage/plugin-catalog-react/alpha';\nimport { compatWrapper } from '@backstage/core-compat-api';\n\nexport const catalogAboutEntityCard = createEntityCardExtension({\n name: 'about',\n loader: async () =>\n import('../components/AboutCard').then(m =>\n compatWrapper(<m.AboutCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogLinksEntityCard = createEntityCardExtension({\n name: 'links',\n filter: 'has:links',\n loader: async () =>\n import('../components/EntityLinksCard').then(m =>\n compatWrapper(<m.EntityLinksCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogLabelsEntityCard = createEntityCardExtension({\n name: 'labels',\n filter: 'has:labels',\n loader: async () =>\n import('../components/EntityLabelsCard').then(m =>\n compatWrapper(<m.EntityLabelsCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogDependsOnComponentsEntityCard = createEntityCardExtension({\n name: 'depends-on-components',\n loader: async () =>\n import('../components/DependsOnComponentsCard').then(m =>\n compatWrapper(<m.DependsOnComponentsCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogDependsOnResourcesEntityCard = createEntityCardExtension({\n name: 'depends-on-resources',\n loader: async () =>\n import('../components/DependsOnResourcesCard').then(m =>\n compatWrapper(<m.DependsOnResourcesCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogHasComponentsEntityCard = createEntityCardExtension({\n name: 'has-components',\n loader: async () =>\n import('../components/HasComponentsCard').then(m =>\n compatWrapper(<m.HasComponentsCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogHasResourcesEntityCard = createEntityCardExtension({\n name: 'has-resources',\n loader: async () =>\n import('../components/HasResourcesCard').then(m =>\n compatWrapper(<m.HasResourcesCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogHasSubcomponentsEntityCard = createEntityCardExtension({\n name: 'has-subcomponents',\n loader: async () =>\n import('../components/HasSubcomponentsCard').then(m =>\n compatWrapper(<m.HasSubcomponentsCard variant=\"gridItem\" />),\n ),\n});\n\nexport const catalogHasSystemsEntityCard = createEntityCardExtension({\n name: 'has-systems',\n loader: async () =>\n import('../components/HasSystemsCard').then(m =>\n compatWrapper(<m.HasSystemsCard variant=\"gridItem\" />),\n ),\n});\n\nexport default [\n catalogAboutEntityCard,\n catalogLinksEntityCard,\n catalogLabelsEntityCard,\n catalogDependsOnComponentsEntityCard,\n catalogDependsOnResourcesEntityCard,\n catalogHasComponentsEntityCard,\n catalogHasResourcesEntityCard,\n catalogHasSubcomponentsEntityCard,\n catalogHasSystemsEntityCard,\n];\n","/*\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 React from 'react';\nimport {\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport {\n createEntityContentExtension,\n catalogExtensionData,\n} from '@backstage/plugin-catalog-react/alpha';\n\nexport const catalogOverviewEntityContent = createEntityContentExtension({\n name: 'overview',\n defaultPath: '/',\n defaultTitle: 'Overview',\n disabled: false,\n inputs: {\n cards: createExtensionInput({\n element: coreExtensionData.reactElement,\n filterFunction: catalogExtensionData.entityFilterFunction.optional(),\n filterExpression: catalogExtensionData.entityFilterExpression.optional(),\n }),\n },\n loader: async ({ inputs }) =>\n import('./EntityOverviewPage').then(m => (\n <m.EntityOverviewPage cards={inputs.cards.map(c => c.output)} />\n )),\n});\n\nexport default [catalogOverviewEntityContent];\n","/*\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 { createSearchResultListItemExtension } from '@backstage/plugin-search-react/alpha';\n\nexport const catalogSearchResultListItem = createSearchResultListItemExtension({\n predicate: result => result.type === 'software-catalog',\n component: () =>\n import('../components/CatalogSearchResultListItem').then(\n m => m.CatalogSearchResultListItem,\n ),\n});\n\nexport default [catalogSearchResultListItem];\n","/*\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 { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createPlugin } from '@backstage/frontend-plugin-api';\n\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\n\nimport {\n createComponentRouteRef,\n createFromTemplateRouteRef,\n rootRouteRef,\n unregisterRedirectRouteRef,\n viewTechDocRouteRef,\n} from '../routes';\n\nimport apis from './apis';\nimport pages from './pages';\nimport filters from './filters';\nimport navItems from './navItems';\nimport entityCards from './entityCards';\nimport entityContents from './entityContents';\nimport searchResultItems from './searchResultItems';\n\n/** @alpha */\nexport default createPlugin({\n id: 'catalog',\n routes: convertLegacyRouteRefs({\n catalogIndex: rootRouteRef,\n catalogEntity: entityRouteRef,\n }),\n externalRoutes: convertLegacyRouteRefs({\n viewTechDoc: viewTechDocRouteRef,\n createComponent: createComponentRouteRef,\n createFromTemplate: createFromTemplateRouteRef,\n unregisterRedirect: unregisterRedirectRouteRef,\n }),\n extensions: [\n ...apis,\n ...pages,\n ...filters,\n ...navItems,\n ...entityCards,\n ...entityContents,\n ...searchResultItems,\n ],\n});\n"],"names":["allowedMatchers"],"mappings":";;;;;;;;;;;;;;AAkCO,MAAM,aAAa,kBAAmB,CAAA;AAAA,EAC3C,SAAS,gBAAiB,CAAA;AAAA,IACxB,GAAK,EAAA,aAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,eAAA;AAAA,MACd,QAAU,EAAA,WAAA;AAAA,KACZ;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,aAAc,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU,CAAA;AAAA,GAC/C,CAAA;AACH,CAAC,CAAA,CAAA;AAEM,MAAM,4BAA4B,kBAAmB,CAAA;AAAA,EAC1D,SAAS,gBAAiB,CAAA;AAAA,IACxB,GAAK,EAAA,qBAAA;AAAA,IACL,IAAA,EAAM,EAAE,UAAA,EAAY,aAAc,EAAA;AAAA,IAClC,OAAA,EAAS,CAAC,EAAE,UAAA,OAAiB,IAAI,yBAAA,CAA0B,EAAE,UAAA,EAAY,CAAA;AAAA,GAC1E,CAAA;AACH,CAAC,CAAA,CAAA;AAEM,MAAM,wBAAwB,kBAAmB,CAAA;AAAA,EACtD,SAAS,gBAAiB,CAAA;AAAA,IACxB,GAAK,EAAA,wBAAA;AAAA,IACL,IAAA,EAAM,EAAE,aAAA,EAAe,aAAc,EAAA;AAAA,IACrC,OAAA,EAAS,CAAC,E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QAAQ,sBAAuB,CAAA;AAAA,IAC7B,YAAc,EAAA,YAAA;AAAA,IACd,aAAe,EAAA,cAAA;AAAA,GAChB,CAAA;AAAA,EACD,gBAAgB,sBAAuB,CAAA;AAAA,IACrC,WAAa,EAAA,mBAAA;AAAA,IACb,eAAiB,EAAA,uBAAA;AAAA,IACjB,kBAAoB,EAAA,0BAAA;AAAA,IACpB,kBAAoB,EAAA,0BAAA;AAAA,GACrB,CAAA;AAAA,EACD,UAAY,EAAA;AAAA,IACV,GAAG,IAAA;AAAA,IACH,GAAG,KAAA;AAAA,IACH,GAAG,OAAA;AAAA,IACH,GAAG,QAAA;AAAA,IACH,GAAG,WAAA;AAAA,IACH,GAAG,cAAA;AAAA,IACH,GAAG,iBAAA;AAAA,GACL;AACF,CAAC,CAAA;;;;"}
|
|
@@ -4,7 +4,7 @@ import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton } f
|
|
|
4
4
|
import { useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
5
5
|
import { EntityListProvider, CatalogFilterLayout, DefaultFilters } from '@backstage/plugin-catalog-react';
|
|
6
6
|
import { c as createComponentRouteRef } from './routes-D5H5grpG.esm.js';
|
|
7
|
-
import { C as CatalogTable } from './CatalogTable-
|
|
7
|
+
import { C as CatalogTable } from './CatalogTable-B8071eCT.esm.js';
|
|
8
8
|
import { createTranslationRef, useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
9
9
|
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
|
|
10
10
|
import { usePermission } from '@backstage/plugin-permission-react';
|
|
@@ -106,4 +106,4 @@ function CatalogPage(props) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export { BaseCatalogPage, CatalogPage, DefaultCatalogPage };
|
|
109
|
-
//# sourceMappingURL=index-
|
|
109
|
+
//# sourceMappingURL=index-B9rsO45f.esm.js.map
|