@backstage/plugin-catalog 1.18.1 → 1.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.18.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e8f026a: Use ESM exports of react-use library
8
+ - bbbd510: `CatalogIndexPage` now uses `EntitySearchBar` for text-based filtering of entities, saving the search text in the query parameters and debouncing the server requests.
9
+ - Updated dependencies
10
+ - @backstage/catalog-client@1.6.3
11
+ - @backstage/core-components@0.14.3
12
+ - @backstage/plugin-catalog-react@1.11.2
13
+ - @backstage/plugin-search-react@1.7.9
14
+ - @backstage/frontend-plugin-api@0.6.3
15
+ - @backstage/integration-react@1.1.25
16
+ - @backstage/core-compat-api@0.2.3
17
+ - @backstage/core-plugin-api@1.9.1
18
+ - @backstage/catalog-model@1.4.5
19
+ - @backstage/errors@1.2.4
20
+ - @backstage/types@1.1.1
21
+ - @backstage/plugin-catalog-common@1.0.22
22
+ - @backstage/plugin-permission-react@0.4.21
23
+ - @backstage/plugin-scaffolder-common@1.5.1
24
+ - @backstage/plugin-search-common@1.2.11
25
+
3
26
  ## 1.18.1
4
27
 
5
28
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog",
3
- "version": "1.18.1",
3
+ "version": "1.18.2",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/alpha.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- export { c as createCatalogFilterExtension, p as default } from './esm/alpha-C2vJQr2i.esm.js';
1
+ export { c as createCatalogFilterExtension, p as default } from './esm/alpha-DdRYU8jw.esm.js';
2
2
  import '@backstage/core-compat-api';
3
3
  import '@backstage/frontend-plugin-api';
4
4
  import '@backstage/plugin-catalog-react';
@@ -1,8 +1,8 @@
1
1
  import { RELATION_PART_OF, RELATION_OWNED_BY, stringifyEntityRef, ANNOTATION_VIEW_URL, ANNOTATION_EDIT_URL } from '@backstage/catalog-model';
2
2
  import { OverflowTooltip, Table, WarningPanel, CodeSnippet } from '@backstage/core-components';
3
- import { EntityRefLink, EntityRefLinks, humanizeEntityRef, useEntityList, EntityTextFilter, useStarredEntities, getEntityRelations } from '@backstage/plugin-catalog-react';
3
+ import { EntityRefLink, EntityRefLinks, humanizeEntityRef, EntitySearchBar, useStarredEntities, useEntityList, getEntityRelations } from '@backstage/plugin-catalog-react';
4
4
  import Typography from '@material-ui/core/Typography';
5
- import { withStyles } from '@material-ui/core/styles';
5
+ import { makeStyles, withStyles } from '@material-ui/core/styles';
6
6
  import { visuallyHidden } from '@mui/utils';
7
7
  import EditIcon from '@material-ui/icons/Edit';
8
8
  import OpenInNew from '@material-ui/icons/OpenInNew';
@@ -12,6 +12,7 @@ import { capitalize } from 'lodash';
12
12
  import pluralize from 'pluralize';
13
13
  import React, { useMemo } from 'react';
14
14
  import Chip from '@material-ui/core/Chip';
15
+ import Toolbar from '@material-ui/core/Toolbar';
15
16
 
16
17
  const columnFactories = Object.freeze({
17
18
  createNameColumn(options) {
@@ -178,9 +179,30 @@ const columnFactories = Object.freeze({
178
179
  }
179
180
  });
180
181
 
182
+ const useToolbarStyles = makeStyles(
183
+ (theme) => ({
184
+ root: {
185
+ paddingTop: theme.spacing(1.25),
186
+ paddingLeft: theme.spacing(2.5),
187
+ paddingBottom: theme.spacing(0.75),
188
+ display: "flex",
189
+ justifyContent: "space-between"
190
+ },
191
+ text: {
192
+ whiteSpace: "nowrap",
193
+ overflow: "hidden",
194
+ textOverflow: "ellipsis"
195
+ }
196
+ }),
197
+ { name: "BackstageTableToolbar" }
198
+ );
199
+ function CatalogTableToolbar(props) {
200
+ const styles = useToolbarStyles();
201
+ return /* @__PURE__ */ React.createElement(Toolbar, { className: styles.root }, /* @__PURE__ */ React.createElement(Typography, { variant: "h5", className: styles.text }, props.title), /* @__PURE__ */ React.createElement(EntitySearchBar, null));
202
+ }
203
+
181
204
  function PaginatedCatalogTable(props) {
182
205
  const { columns, data, next, prev, title, isLoading, options } = props;
183
- const { updateFilters } = useEntityList();
184
206
  return /* @__PURE__ */ React.createElement(
185
207
  Table,
186
208
  {
@@ -196,9 +218,6 @@ function PaginatedCatalogTable(props) {
196
218
  pageSize: Number.MAX_SAFE_INTEGER,
197
219
  emptyRowsWhenPaging: false
198
220
  },
199
- onSearchChange: (searchText) => updateFilters({
200
- text: searchText ? new EntityTextFilter(searchText) : void 0
201
- }),
202
221
  onPageChange: (page) => {
203
222
  if (page > 0) {
204
223
  next == null ? void 0 : next();
@@ -206,6 +225,9 @@ function PaginatedCatalogTable(props) {
206
225
  prev == null ? void 0 : prev();
207
226
  }
208
227
  },
228
+ components: {
229
+ Toolbar: CatalogTableToolbar
230
+ },
209
231
  page: prev ? 1 : 0,
210
232
  totalCount: next ? Number.MAX_VALUE : Number.MAX_SAFE_INTEGER,
211
233
  localization: { pagination: { labelDisplayedRows: "" } }
@@ -355,7 +377,7 @@ const CatalogTable = (props) => {
355
377
  columns: tableColumns,
356
378
  emptyContent,
357
379
  isLoading: loading,
358
- title,
380
+ title: titleDisplay,
359
381
  actions,
360
382
  subtitle,
361
383
  options,
@@ -417,4 +439,4 @@ function toEntityRow(entity) {
417
439
  }
418
440
 
419
441
  export { CatalogTable as C };
420
- //# sourceMappingURL=CatalogTable-BvyJNYOs.esm.js.map
442
+ //# sourceMappingURL=CatalogTable-D9UBRyWs.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CatalogTable-D9UBRyWs.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 return {\n title: options?.title || 'Label',\n field: 'entity.metadata.labels',\n cellStyle: {\n padding: '0px 16px 0px 20px',\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,eAA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AAAA;AAAA;AAAA;AAAA,MAIR,IAAA,EAAM,kBAAkB,MAAQ,EAAA;AAAA,QAC9B,WAAa,EAAA,WAAA;AAAA,OACd,CAAA;AAAA,MACD,SAAA,EAAW,mBAAmB,MAAM,CAAA;AAAA,MACpC,qBAAuB,EAAA,gBAAA,CACpB,GAAI,CAAA,CAAA,CAAA,KAAK,iBAAkB,CAAA,CAAA,EAAG,EAAE,WAAA,EAAa,OAAQ,EAAC,CAAC,CAAA,CACvD,KAAK,IAAI,CAAA;AAAA,MACZ,gBAAA;AAAA,MACA,2BAA2B,qBACxB,CAAA,GAAA;AAAA,QAAI,CAAA,CAAA,KACH,kBAAkB,CAAG,EAAA;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-C2vJQr2i.esm.js';
4
+ import { F as FilterWrapper } from './alpha-DdRYU8jw.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-j7yeui2y.esm.js.map
49
+ //# sourceMappingURL=EntityOverviewPage-Bzd86gsX.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityOverviewPage-j7yeui2y.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 <FilterW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A,KAAA,CAAA,aAAA,CAAC,QAAK,SAAS,EAAA,IAAA,EAAC,SAAS,CAAG,EAAA,UAAA,EAAW,SACpC,EAAA,EAAA,oBAAA,EACA,KAAM,CAAA,KAAA,CAAM,IAAI,CAAC,IAAA,EAAM,KACtB,qBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,GAAA,EAAK,OAAO,MAAiB,EAAA,GAAG,IAAM,EAAA,CACtD,CACH,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityOverviewPage-Bzd86gsX.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,YAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,YAAA,CAAa,IAAb,EAAA,EAAkB,EAAI,EAAA,QAAA,EAAA,kBACpB,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,EAAA,EAAA,kBACZ,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA,IAAoB,CACvB,CACF,CACF,CAAA,kBAEC,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,YAAA,CAAa,IAAb,EAAA,EAAkB,EAAI,EAAA,mBAAA,EAAA,kBACpB,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,EAAA,EAAA,kBACZ,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,CACzB,CACF,CACF,CAAA,kBAEC,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,YAAA,CAAa,IAAb,EAAA,EAAkB,EAAI,EAAA,0BAAA,EAAA,kBACpB,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,EAAA,EAAA,kBACZ,KAAA,CAAA,aAAA,CAAA,2BAAA,EAAA,IAA4B,CAC/B,CACF,CACF,CACF,CAAA,CAAA;AAGK,SAAS,mBAAmB,KAAgC,EAAA;AACjE,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,SAAS,EAAA,IAAA,EAAC,SAAS,CAAG,EAAA,UAAA,EAAW,SACpC,EAAA,EAAA,oBAAA,EACA,KAAM,CAAA,KAAA,CAAM,IAAI,CAAC,IAAA,EAAM,KACtB,qBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,GAAA,EAAK,OAAO,MAAiB,EAAA,GAAG,IAAM,EAAA,CACtD,CACH,CAAA,CAAA;AAEJ;;;;"}
@@ -199,7 +199,7 @@ const catalogPage = createPageExtension({
199
199
  })
200
200
  },
201
201
  loader: async ({ inputs }) => {
202
- const { BaseCatalogPage } = await import('./index-BIX2jJZf.esm.js');
202
+ const { BaseCatalogPage } = await import('./index-tUif74w6.esm.js');
203
203
  const filters = inputs.filters.map((filter) => filter.output.element);
204
204
  return compatWrapper(/* @__PURE__ */ React.createElement(BaseCatalogPage, { filters: /* @__PURE__ */ React.createElement(React.Fragment, null, filters) }));
205
205
  }
@@ -432,7 +432,7 @@ const catalogOverviewEntityContent = createEntityContentExtension({
432
432
  filterExpression: catalogExtensionData.entityFilterExpression.optional()
433
433
  })
434
434
  },
435
- loader: async ({ inputs }) => import('./EntityOverviewPage-j7yeui2y.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.EntityOverviewPage, { cards: inputs.cards.map((c) => c.output) }))
435
+ loader: async ({ inputs }) => import('./EntityOverviewPage-Bzd86gsX.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.EntityOverviewPage, { cards: inputs.cards.map((c) => c.output) }))
436
436
  });
437
437
  var entityContents = [catalogOverviewEntityContent];
438
438
 
@@ -468,4 +468,4 @@ var plugin = createPlugin({
468
468
  });
469
469
 
470
470
  export { FilterWrapper as F, createCatalogFilterExtension as c, plugin as p };
471
- //# sourceMappingURL=alpha-C2vJQr2i.esm.js.map
471
+ //# sourceMappingURL=alpha-DdRYU8jw.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha-C2vJQr2i.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 starredEntitiesApiRef,\n} from '@backstage/plugin-catalog-react';\nimport { DefaultStarredEntitiesApi } 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 default [catalogApi, catalogStarredEntitiesApi];\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":";;;;;;;;;;;;;;AA8BO,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;AAED,WAAe,CAAC,YAAY,yBAAyB,CAAA;;AC7BrC,SAAA,iBAAA,CACd,YACA,aACiB,EAAA;AACjB,EAAA,MAAM,QAAQ,UAAW,CAAA,GAAA,CAAI,OAAK,CAAE,CAAA,iBAAA,CAAkB,OAAO,CAAC,CAAA,CAAA;AAC9D,EAAA,OAAO,YAAU,KAAM,CAAA,QAAA,CAAS,O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IACH,GAAG,QAAA;AAAA,IACH,GAAG,WAAA;AAAA,IACH,GAAG,cAAA;AAAA,IACH,GAAG,iBAAA;AAAA,GACL;AACF,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha-DdRYU8jw.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 starredEntitiesApiRef,\n} from '@backstage/plugin-catalog-react';\nimport { DefaultStarredEntitiesApi } 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 default [catalogApi, catalogStarredEntitiesApi];\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,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,sCAAsB,CAAE,CAAA,IAAA,CAAK,CAClC,CAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,EAAE,kBAAF,EAAA,EAAqB,OAAO,MAAO,CAAA,KAAA,CAAM,IAAI,CAAK,CAAA,KAAA,CAAA,CAAE,MAAM,CAAA,EAAG,CAC/D,CAAA;AACL,CAAC,CAAA,CAAA;AAED,qBAAe,CAAC,4BAA4B,CAAA;;AC1BrC,MAAM,8BAA8B,mCAAoC,CAAA;AAAA,EAC7E,SAAA,EAAW,CAAU,MAAA,KAAA,MAAA,CAAO,IAAS,KAAA,kBAAA;AAAA,EACrC,SAAW,EAAA,MACT,OAAO,yBAA2C,CAAE,CAAA,IAAA;AAAA,IAClD,OAAK,CAAE,CAAA,2BAAA;AAAA,GACT;AACJ,CAAC,CAAA,CAAA;AAED,wBAAe,CAAC,2BAA2B,CAAA;;ACY3C,aAAe,YAAa,CAAA;AAAA,EAC1B,EAAI,EAAA,SAAA;AAAA,EACJ,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-BvyJNYOs.esm.js';
7
+ import { C as CatalogTable } from './CatalogTable-D9UBRyWs.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';
@@ -32,6 +32,7 @@ import '@material-ui/icons/Star';
32
32
  import '@material-ui/icons/StarBorder';
33
33
  import 'pluralize';
34
34
  import '@material-ui/core/Chip';
35
+ import '@material-ui/core/Toolbar';
35
36
 
36
37
  const catalogTranslationRef = createTranslationRef({
37
38
  id: "catalog",
@@ -105,4 +106,4 @@ function CatalogPage(props) {
105
106
  }
106
107
 
107
108
  export { BaseCatalogPage, CatalogPage, DefaultCatalogPage };
108
- //# sourceMappingURL=index-BIX2jJZf.esm.js.map
109
+ //# sourceMappingURL=index-tUif74w6.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BIX2jJZf.esm.js","sources":["../../src/translation.ts","../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n },\n },\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityListProvider,\n UserListFilterKind,\n EntityOwnerPickerProps,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { catalogTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nimport { CatalogTableColumnsFunc } from '../CatalogTable/types';\nimport { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { DefaultFilters } from '@backstage/plugin-catalog-react';\n\n/** @internal */\nexport type BaseCatalogPageProps = {\n filters: ReactNode;\n content?: ReactNode;\n pagination?: boolean | { limit?: number };\n};\n\n/** @internal */\nexport function BaseCatalogPage(props: BaseCatalogPageProps) {\n const { filters, content = <CatalogTable />, pagination } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n const { allowed } = usePermission({\n permission: catalogEntityCreatePermission,\n });\n\n return (\n <PageWithHeader title={t('indexPage.title', { orgName })} themeId=\"home\">\n <Content>\n <ContentHeader title=\"\">\n {allowed && (\n <CreateButton\n title={t('indexPage.createButtonTitle')}\n to={createComponentLink && createComponentLink()}\n />\n )}\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <EntityListProvider pagination={pagination}>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>{filters}</CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>{content}</CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n}\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[] | CatalogTableColumnsFunc;\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n ownerPickerMode?: EntityOwnerPickerProps['mode'];\n pagination?: boolean | { limit?: number };\n filters?: ReactNode;\n initiallySelectedNamespaces?: string[];\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n pagination,\n ownerPickerMode,\n filters,\n initiallySelectedNamespaces,\n } = props;\n\n return (\n <BaseCatalogPage\n filters={\n filters ?? (\n <DefaultFilters\n initialKind={initialKind}\n initiallySelectedFilter={initiallySelectedFilter}\n ownerPickerMode={ownerPickerMode}\n initiallySelectedNamespaces={initiallySelectedNamespaces}\n />\n )\n }\n content={\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n }\n pagination={pagination}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,wBAAwB,oBAAqB,CAAA;AAAA,EACxD,EAAI,EAAA,SAAA;AAAA,EACJ,QAAU,EAAA;AAAA,IACR,SAAW,EAAA;AAAA,MACT,KAAO,EAAA,CAAA,mBAAA,CAAA;AAAA,MACP,iBAAmB,EAAA,QAAA;AAAA,KACrB;AAAA,GACF;AACF,CAAC,CAAA;;ACwBM,SAAS,gBAAgB,KAA6B,EAAA;AAnD7D,EAAA,IAAA,EAAA,CAAA;AAoDE,EAAA,MAAM,EAAE,OAAS,EAAA,OAAA,uCAAW,YAAa,EAAA,IAAA,CAAA,EAAI,YAAe,GAAA,KAAA,CAAA;AAC5D,EAAA,MAAM,WACJ,EAAO,GAAA,MAAA,CAAA,YAAY,EAAE,iBAAkB,CAAA,mBAAmB,MAA1D,IAA+D,GAAA,EAAA,GAAA,WAAA,CAAA;AACjE,EAAM,MAAA,mBAAA,GAAsB,YAAY,uBAAuB,CAAA,CAAA;AAC/D,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,qBAAqB,CAAA,CAAA;AACrD,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,aAAc,CAAA;AAAA,IAChC,UAAY,EAAA,6BAAA;AAAA,GACb,CAAA,CAAA;AAED,EAAA,2CACG,cAAe,EAAA,EAAA,KAAA,EAAO,CAAE,CAAA,iBAAA,EAAmB,EAAE,OAAQ,EAAC,CAAG,EAAA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BAAA,KAAA,CAAA,aAAA;AAAA,QAAC,YAAA;AAAA,QAAA;AAAA,UACC,OAAA;AAAA,UACA,OAAA;AAAA,UACA,YAAA;AAAA,UACA,YAAA;AAAA,SAAA;AAAA,OACF;AAAA,MAEF,UAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;ACpHO,SAAS,YAAY,KAAgC,EAAA;AAC1D,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,OAAO,MAAU,oBAAA,KAAA,CAAA,aAAA,CAAC,kBAAoB,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA,CAAA;AAClD;;;;"}
1
+ {"version":3,"file":"index-tUif74w6.esm.js","sources":["../../src/translation.ts","../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n },\n },\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityListProvider,\n UserListFilterKind,\n EntityOwnerPickerProps,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { catalogTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nimport { CatalogTableColumnsFunc } from '../CatalogTable/types';\nimport { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { DefaultFilters } from '@backstage/plugin-catalog-react';\n\n/** @internal */\nexport type BaseCatalogPageProps = {\n filters: ReactNode;\n content?: ReactNode;\n pagination?: boolean | { limit?: number };\n};\n\n/** @internal */\nexport function BaseCatalogPage(props: BaseCatalogPageProps) {\n const { filters, content = <CatalogTable />, pagination } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n const { allowed } = usePermission({\n permission: catalogEntityCreatePermission,\n });\n\n return (\n <PageWithHeader title={t('indexPage.title', { orgName })} themeId=\"home\">\n <Content>\n <ContentHeader title=\"\">\n {allowed && (\n <CreateButton\n title={t('indexPage.createButtonTitle')}\n to={createComponentLink && createComponentLink()}\n />\n )}\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <EntityListProvider pagination={pagination}>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>{filters}</CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>{content}</CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n}\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[] | CatalogTableColumnsFunc;\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n ownerPickerMode?: EntityOwnerPickerProps['mode'];\n pagination?: boolean | { limit?: number };\n filters?: ReactNode;\n initiallySelectedNamespaces?: string[];\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n pagination,\n ownerPickerMode,\n filters,\n initiallySelectedNamespaces,\n } = props;\n\n return (\n <BaseCatalogPage\n filters={\n filters ?? (\n <DefaultFilters\n initialKind={initialKind}\n initiallySelectedFilter={initiallySelectedFilter}\n ownerPickerMode={ownerPickerMode}\n initiallySelectedNamespaces={initiallySelectedNamespaces}\n />\n )\n }\n content={\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n }\n pagination={pagination}\n />\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\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AO,MAAU,oBAAA,KAAA,CAAA,aAAA,CAAC,kBAAoB,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA,CAAA;AAClD;;;;"}
package/dist/index.esm.js CHANGED
@@ -9,7 +9,7 @@ import { catalogApiRef, useEntityList, EntityKindFilter, CatalogFilterLayout, st
9
9
  import pluralize from 'pluralize';
10
10
  import { useApi, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
11
11
  import useAsync from 'react-use/esm/useAsync';
12
- export { C as CatalogTable } from './esm/CatalogTable-BvyJNYOs.esm.js';
12
+ export { C as CatalogTable } from './esm/CatalogTable-D9UBRyWs.esm.js';
13
13
  export { E as EntityLayout } from './esm/EntityLayout-DJ8fmLlG.esm.js';
14
14
  export { a as EntityOrphanWarning, d as EntityProcessingErrorsPanel, b as EntityRelationWarning, E as EntitySwitch, c as hasCatalogProcessingErrors, h as hasRelationWarnings, i as isOrphan } from './esm/EntitySwitch-D82_YYhG.esm.js';
15
15
  export { h as hasLabels } from './esm/conditions-D3nrPoMz.esm.js';
@@ -57,6 +57,7 @@ import '@mui/utils';
57
57
  import '@material-ui/icons/OpenInNew';
58
58
  import '@material-ui/icons/Star';
59
59
  import '@material-ui/icons/StarBorder';
60
+ import '@material-ui/core/Toolbar';
60
61
  import '@material-ui/lab/Alert';
61
62
  import 'react-router-dom';
62
63
  import '@material-ui/core/ListItemIcon';
@@ -240,7 +241,7 @@ const catalogPlugin = createPlugin({
240
241
  const CatalogIndexPage = catalogPlugin.provide(
241
242
  createRoutableExtension({
242
243
  name: "CatalogIndexPage",
243
- component: () => import('./esm/index-BIX2jJZf.esm.js').then((m) => m.CatalogPage),
244
+ component: () => import('./esm/index-tUif74w6.esm.js').then((m) => m.CatalogPage),
244
245
  mountPoint: rootRouteRef
245
246
  })
246
247
  );
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/components/CatalogKindHeader/kindFilterUtils.ts","../src/components/CatalogKindHeader/CatalogKindHeader.tsx","../src/components/EntitySwitch/conditions.ts","../src/components/FilteredEntityLayout/index.ts","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport useAsync from 'react-use/esm/useAsync';\n\n/**\n * Fetch and return all availible kinds.\n */\nexport function useAllKinds(): {\n loading: boolean;\n error?: Error;\n allKinds: string[];\n} {\n const catalogApi = useApi(catalogApiRef);\n\n const {\n error,\n loading,\n value: allKinds,\n } = useAsync(async () => {\n const items = await catalogApi\n .getEntityFacets({ facets: ['kind'] })\n .then(response => response.facets.kind?.map(f => f.value).sort() || []);\n return items;\n }, [catalogApi]);\n\n return { loading, error, allKinds: allKinds ?? [] };\n}\n\n/**\n * Filter and capitalize accessible kinds.\n */\nexport function filterKinds(\n allKinds: string[],\n allowedKinds?: string[],\n forcedKinds?: string,\n): Record<string, string> {\n // Before allKinds is loaded, or when a kind is entered manually in the URL, selectedKind may not\n // be present in allKinds. It should still be shown in the dropdown, but may not have the nice\n // enforced casing from the catalog-backend. This makes a key/value record for the Select options,\n // including selectedKind if it's unknown - but allows the selectedKind to get clobbered by the\n // more proper catalog kind if it exists.\n let availableKinds = allKinds;\n if (allowedKinds) {\n availableKinds = availableKinds.filter(k =>\n allowedKinds.some(\n a => a.toLocaleLowerCase('en-US') === k.toLocaleLowerCase('en-US'),\n ),\n );\n }\n if (\n forcedKinds &&\n !allKinds.some(\n a =>\n a.toLocaleLowerCase('en-US') === forcedKinds.toLocaleLowerCase('en-US'),\n )\n ) {\n availableKinds = availableKinds.concat([forcedKinds]);\n }\n\n const kindsMap = availableKinds.sort().reduce((acc, kind) => {\n acc[kind.toLocaleLowerCase('en-US')] = kind;\n return acc;\n }, {} as Record<string, string>);\n\n return kindsMap;\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect, useState, useMemo } from 'react';\nimport InputBase from '@material-ui/core/InputBase';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Select from '@material-ui/core/Select';\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles';\nimport {\n EntityKindFilter,\n useEntityList,\n} from '@backstage/plugin-catalog-react';\nimport pluralize from 'pluralize';\nimport { filterKinds, useAllKinds } from './kindFilterUtils';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n ...theme.typography.h4,\n },\n }),\n);\n\n/**\n * Props for {@link CatalogKindHeader}.\n *\n * @public\n */\nexport interface CatalogKindHeaderProps {\n /**\n * Entity kinds to show in the dropdown; by default all kinds are fetched from the catalog and\n * displayed.\n */\n allowedKinds?: string[];\n /**\n * The initial kind to select; defaults to 'component'. A kind filter entered directly in the\n * query parameter will override this value.\n */\n initialFilter?: string;\n}\n\n/**\n * @public\n * @deprecated This component has been deprecated in favour of the EntityKindPicker in the list of filters. If you wish to keep this component long term make sure to raise an issue at github.com/backstage/backstage\n */\nexport function CatalogKindHeader(props: CatalogKindHeaderProps) {\n const { initialFilter = 'component', allowedKinds } = props;\n const classes = useStyles();\n const { allKinds } = useAllKinds();\n const {\n filters,\n updateFilters,\n queryParameters: { kind: kindParameter },\n } = useEntityList();\n\n const queryParamKind = useMemo(\n () => [kindParameter].flat()[0],\n [kindParameter],\n );\n\n const [selectedKind, setSelectedKind] = useState(\n queryParamKind ?? filters.kind?.value ?? initialFilter,\n );\n\n // Set selected kinds on query parameter updates; this happens at initial page load and from\n // external updates to the page location.\n useEffect(() => {\n if (queryParamKind) {\n setSelectedKind(queryParamKind);\n }\n }, [queryParamKind]);\n\n // Set selected kind from filters; this happens when the kind filter is\n // updated from another component\n useEffect(() => {\n if (filters.kind?.value) {\n setSelectedKind(filters.kind?.value);\n }\n }, [filters.kind]);\n\n useEffect(() => {\n updateFilters({\n kind: selectedKind ? new EntityKindFilter(selectedKind) : undefined,\n });\n }, [selectedKind, updateFilters]);\n\n const options = filterKinds(allKinds, allowedKinds, selectedKind);\n\n return (\n <Select\n input={<InputBase />}\n value={selectedKind.toLocaleLowerCase('en-US')}\n onChange={e => setSelectedKind(e.target.value as string)}\n classes={classes}\n >\n {Object.keys(options).map(kind => (\n <MenuItem value={kind} key={kind}>\n {`${pluralize(options[kind])}`}\n </MenuItem>\n ))}\n </Select>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\n\n/** @public */\nexport interface EntityPredicates {\n kind?: string | string[];\n type?: string | string[];\n}\n\nfunction strCmp(a: unknown, b: string | undefined): boolean {\n return Boolean(\n a &&\n typeof a === 'string' &&\n a?.toLocaleLowerCase('en-US') === b?.toLocaleLowerCase('en-US'),\n );\n}\n\nfunction strCmpAll(value: unknown, cmpValues: string | string[]) {\n return typeof cmpValues === 'string'\n ? strCmp(value, cmpValues)\n : cmpValues.length === 0 || cmpValues.some(cmpVal => strCmp(value, cmpVal));\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is of a given kind.\n * @public\n */\nexport function isKind(kinds: string | string[]) {\n return isEntityWith({ kind: kinds });\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is a Component of a given spec.type.\n * @public\n */\nexport function isComponentType(types: string | string[]) {\n return isEntityWith({ kind: 'component', type: types });\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is a Resource of a given spec.type.\n * @public\n */\nexport function isResourceType(types: string | string[]) {\n return isEntityWith({ kind: 'resource', type: types });\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is the specified kind and type (if present).\n * @public\n */\nexport function isEntityWith(predicate: EntityPredicates) {\n return (entity: Entity) => {\n if (predicate.kind && !strCmpAll(entity.kind, predicate.kind)) {\n return false;\n }\n\n if (predicate.type && !strCmpAll(entity.spec?.type, predicate.type)) {\n return false;\n }\n\n // there's no type check, return true\n return true;\n };\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is in a given namespace.\n * @public\n */\nexport function isNamespace(namespaces: string | string[]) {\n return (entity: Entity) => strCmpAll(entity.metadata?.namespace, namespaces);\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 { CatalogFilterLayout } from '@backstage/plugin-catalog-react';\n\n/**\n * @public\n * @deprecated Use `CatalogFilterLayout` from `@backstage/plugin-catalog-react` instead.\n */\nexport const FilteredEntityLayout = CatalogFilterLayout as (props: {\n children: React.ReactNode;\n}) => JSX.Element;\n\n/**\n * @public\n * @deprecated Use `CatalogFilterLayout.Filters` from `@backstage/plugin-catalog-react` instead.\n */\nexport const FilterContainer = CatalogFilterLayout.Filters;\n\n/**\n * @public\n * @deprecated Use `CatalogFilterLayout.Content` from `@backstage/plugin-catalog-react` instead.\n */\nexport const EntityListContainer = CatalogFilterLayout.Content;\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 { CatalogClient } from '@backstage/catalog-client';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n entityPresentationApiRef,\n entityRouteRef,\n starredEntitiesApiRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n createComponentRouteRef,\n createFromTemplateRouteRef,\n unregisterRedirectRouteRef,\n viewTechDocRouteRef,\n} from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n storageApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { DefaultStarredEntitiesApi } from './apis';\nimport { AboutCardProps } from './components/AboutCard';\nimport { DefaultCatalogPageProps } from './components/CatalogPage';\nimport { DependencyOfComponentsCardProps } from './components/DependencyOfComponentsCard';\nimport { DependsOnComponentsCardProps } from './components/DependsOnComponentsCard';\nimport { DependsOnResourcesCardProps } from './components/DependsOnResourcesCard';\nimport { HasComponentsCardProps } from './components/HasComponentsCard';\nimport { HasResourcesCardProps } from './components/HasResourcesCard';\nimport { HasSubcomponentsCardProps } from './components/HasSubcomponentsCard';\nimport { HasSystemsCardProps } from './components/HasSystemsCard';\nimport { RelatedEntitiesCardProps } from './components/RelatedEntitiesCard';\nimport { CatalogSearchResultListItemProps } from './components/CatalogSearchResultListItem';\nimport { rootRouteRef } from './routes';\nimport { DefaultEntityPresentationApi } from './apis/EntityPresentationApi';\n\n/** @public */\nexport const catalogPlugin = createPlugin({\n id: 'catalog',\n apis: [\n createApiFactory({\n api: catalogApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogClient({ discoveryApi, fetchApi }),\n }),\n createApiFactory({\n api: starredEntitiesApiRef,\n deps: { storageApi: storageApiRef },\n factory: ({ storageApi }) =>\n new DefaultStarredEntitiesApi({ storageApi }),\n }),\n createApiFactory({\n api: entityPresentationApiRef,\n deps: { catalogApi: catalogApiRef },\n factory: ({ catalogApi }) =>\n DefaultEntityPresentationApi.create({ catalogApi }),\n }),\n ],\n routes: {\n catalogIndex: rootRouteRef,\n catalogEntity: entityRouteRef,\n },\n externalRoutes: {\n createComponent: createComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n createFromTemplate: createFromTemplateRouteRef,\n unregisterRedirect: unregisterRedirectRouteRef,\n },\n});\n\n/** @public */\nexport const CatalogIndexPage: (props: DefaultCatalogPageProps) => JSX.Element =\n catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogIndexPage',\n component: () =>\n import('./components/CatalogPage').then(m => m.CatalogPage),\n mountPoint: rootRouteRef,\n }),\n );\n\n/** @public */\nexport const CatalogEntityPage: () => JSX.Element = catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogEntityPage',\n component: () =>\n import('./components/CatalogEntityPage').then(m => m.CatalogEntityPage),\n mountPoint: entityRouteRef,\n }),\n);\n\n/** @public */\nexport const EntityAboutCard: (props: AboutCardProps) => JSX.Element =\n catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityAboutCard',\n component: {\n lazy: () => import('./components/AboutCard').then(m => m.AboutCard),\n },\n }),\n );\n\n/** @public */\nexport const EntityLinksCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLinksCard',\n component: {\n lazy: () =>\n import('./components/EntityLinksCard').then(m => m.EntityLinksCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityLabelsCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLabelsCard',\n component: {\n lazy: () =>\n import('./components/EntityLabelsCard').then(m => m.EntityLabelsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSystemsCard: (props: HasSystemsCardProps) => JSX.Element =\n catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSystemsCard',\n component: {\n lazy: () =>\n import('./components/HasSystemsCard').then(m => m.HasSystemsCard),\n },\n }),\n );\n\n/** @public */\nexport const EntityHasComponentsCard: (\n props: HasComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasComponentsCard',\n component: {\n lazy: () =>\n import('./components/HasComponentsCard').then(m => m.HasComponentsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSubcomponentsCard: (\n props: HasSubcomponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSubcomponentsCard',\n component: {\n lazy: () =>\n import('./components/HasSubcomponentsCard').then(\n m => m.HasSubcomponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasResourcesCard: (\n props: HasResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasResourcesCard',\n component: {\n lazy: () =>\n import('./components/HasResourcesCard').then(m => m.HasResourcesCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnComponentsCard: (\n props: DependsOnComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependsOnComponentsCard').then(\n m => m.DependsOnComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependencyOfComponentsCard: (\n props: DependencyOfComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependencyOfComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependencyOfComponentsCard').then(\n m => m.DependencyOfComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnResourcesCard: (\n props: DependsOnResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnResourcesCard',\n component: {\n lazy: () =>\n import('./components/DependsOnResourcesCard').then(\n m => m.DependsOnResourcesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const RelatedEntitiesCard: <T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'RelatedEntitiesCard',\n component: {\n lazy: () =>\n import('./components/RelatedEntitiesCard').then(\n m => m.RelatedEntitiesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const CatalogSearchResultListItem: (\n props: SearchResultListItemExtensionProps<CatalogSearchResultListItemProps>,\n) => JSX.Element | null = catalogPlugin.provide(\n createSearchResultListItemExtension({\n name: 'CatalogSearchResultListItem',\n component: () =>\n import('./components/CatalogSearchResultListItem').then(\n m => m.CatalogSearchResultListItem,\n ),\n predicate: result => result.type === 'software-catalog',\n }),\n);\n"],"names":["_a","_b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,SAAS,WAId,GAAA;AACA,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AAEvC,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAO,EAAA,QAAA;AAAA,GACT,GAAI,SAAS,YAAY;AACvB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AAA,GACD,CAAA;AACH,EAAA;AAGO,MAAM,sBAEM,aAAc,CAAA,OAAA;AAAA,EAC/B,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,qBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,6BAAkC,CAAE,CAAA,IAAA;AAAA,QACzC,OAAK,CAAE,CAAA,mBAAA;AAAA,OACT;AAAA,KACJ;AAAA,GACD,CAAA;AACH,EAAA;AAGO,MAAM,8BAEa,aAAc,CAAA,OAAA;AAAA,EACtC,mCAAoC,CAAA;AAAA,IAClC,IAAM,EAAA,6BAAA;AAAA,IACN,SAAW,EAAA,MACT,OAAO,6BAA0C,CAAE,CAAA,IAAA;AAAA,MACjD,OAAK,CAAE,CAAA,2BAAA;AAAA,KACT;AAAA,IACF,SAAA,EAAW,CAAU,MAAA,KAAA,MAAA,CAAO,IAAS,KAAA,kBAAA;AAAA,GACtC,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/components/CatalogKindHeader/kindFilterUtils.ts","../src/components/CatalogKindHeader/CatalogKindHeader.tsx","../src/components/EntitySwitch/conditions.ts","../src/components/FilteredEntityLayout/index.ts","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport useAsync from 'react-use/esm/useAsync';\n\n/**\n * Fetch and return all availible kinds.\n */\nexport function useAllKinds(): {\n loading: boolean;\n error?: Error;\n allKinds: string[];\n} {\n const catalogApi = useApi(catalogApiRef);\n\n const {\n error,\n loading,\n value: allKinds,\n } = useAsync(async () => {\n const items = await catalogApi\n .getEntityFacets({ facets: ['kind'] })\n .then(response => response.facets.kind?.map(f => f.value).sort() || []);\n return items;\n }, [catalogApi]);\n\n return { loading, error, allKinds: allKinds ?? [] };\n}\n\n/**\n * Filter and capitalize accessible kinds.\n */\nexport function filterKinds(\n allKinds: string[],\n allowedKinds?: string[],\n forcedKinds?: string,\n): Record<string, string> {\n // Before allKinds is loaded, or when a kind is entered manually in the URL, selectedKind may not\n // be present in allKinds. It should still be shown in the dropdown, but may not have the nice\n // enforced casing from the catalog-backend. This makes a key/value record for the Select options,\n // including selectedKind if it's unknown - but allows the selectedKind to get clobbered by the\n // more proper catalog kind if it exists.\n let availableKinds = allKinds;\n if (allowedKinds) {\n availableKinds = availableKinds.filter(k =>\n allowedKinds.some(\n a => a.toLocaleLowerCase('en-US') === k.toLocaleLowerCase('en-US'),\n ),\n );\n }\n if (\n forcedKinds &&\n !allKinds.some(\n a =>\n a.toLocaleLowerCase('en-US') === forcedKinds.toLocaleLowerCase('en-US'),\n )\n ) {\n availableKinds = availableKinds.concat([forcedKinds]);\n }\n\n const kindsMap = availableKinds.sort().reduce((acc, kind) => {\n acc[kind.toLocaleLowerCase('en-US')] = kind;\n return acc;\n }, {} as Record<string, string>);\n\n return kindsMap;\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect, useState, useMemo } from 'react';\nimport InputBase from '@material-ui/core/InputBase';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Select from '@material-ui/core/Select';\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles';\nimport {\n EntityKindFilter,\n useEntityList,\n} from '@backstage/plugin-catalog-react';\nimport pluralize from 'pluralize';\nimport { filterKinds, useAllKinds } from './kindFilterUtils';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n ...theme.typography.h4,\n },\n }),\n);\n\n/**\n * Props for {@link CatalogKindHeader}.\n *\n * @public\n */\nexport interface CatalogKindHeaderProps {\n /**\n * Entity kinds to show in the dropdown; by default all kinds are fetched from the catalog and\n * displayed.\n */\n allowedKinds?: string[];\n /**\n * The initial kind to select; defaults to 'component'. A kind filter entered directly in the\n * query parameter will override this value.\n */\n initialFilter?: string;\n}\n\n/**\n * @public\n * @deprecated This component has been deprecated in favour of the EntityKindPicker in the list of filters. If you wish to keep this component long term make sure to raise an issue at github.com/backstage/backstage\n */\nexport function CatalogKindHeader(props: CatalogKindHeaderProps) {\n const { initialFilter = 'component', allowedKinds } = props;\n const classes = useStyles();\n const { allKinds } = useAllKinds();\n const {\n filters,\n updateFilters,\n queryParameters: { kind: kindParameter },\n } = useEntityList();\n\n const queryParamKind = useMemo(\n () => [kindParameter].flat()[0],\n [kindParameter],\n );\n\n const [selectedKind, setSelectedKind] = useState(\n queryParamKind ?? filters.kind?.value ?? initialFilter,\n );\n\n // Set selected kinds on query parameter updates; this happens at initial page load and from\n // external updates to the page location.\n useEffect(() => {\n if (queryParamKind) {\n setSelectedKind(queryParamKind);\n }\n }, [queryParamKind]);\n\n // Set selected kind from filters; this happens when the kind filter is\n // updated from another component\n useEffect(() => {\n if (filters.kind?.value) {\n setSelectedKind(filters.kind?.value);\n }\n }, [filters.kind]);\n\n useEffect(() => {\n updateFilters({\n kind: selectedKind ? new EntityKindFilter(selectedKind) : undefined,\n });\n }, [selectedKind, updateFilters]);\n\n const options = filterKinds(allKinds, allowedKinds, selectedKind);\n\n return (\n <Select\n input={<InputBase />}\n value={selectedKind.toLocaleLowerCase('en-US')}\n onChange={e => setSelectedKind(e.target.value as string)}\n classes={classes}\n >\n {Object.keys(options).map(kind => (\n <MenuItem value={kind} key={kind}>\n {`${pluralize(options[kind])}`}\n </MenuItem>\n ))}\n </Select>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\n\n/** @public */\nexport interface EntityPredicates {\n kind?: string | string[];\n type?: string | string[];\n}\n\nfunction strCmp(a: unknown, b: string | undefined): boolean {\n return Boolean(\n a &&\n typeof a === 'string' &&\n a?.toLocaleLowerCase('en-US') === b?.toLocaleLowerCase('en-US'),\n );\n}\n\nfunction strCmpAll(value: unknown, cmpValues: string | string[]) {\n return typeof cmpValues === 'string'\n ? strCmp(value, cmpValues)\n : cmpValues.length === 0 || cmpValues.some(cmpVal => strCmp(value, cmpVal));\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is of a given kind.\n * @public\n */\nexport function isKind(kinds: string | string[]) {\n return isEntityWith({ kind: kinds });\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is a Component of a given spec.type.\n * @public\n */\nexport function isComponentType(types: string | string[]) {\n return isEntityWith({ kind: 'component', type: types });\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is a Resource of a given spec.type.\n * @public\n */\nexport function isResourceType(types: string | string[]) {\n return isEntityWith({ kind: 'resource', type: types });\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is the specified kind and type (if present).\n * @public\n */\nexport function isEntityWith(predicate: EntityPredicates) {\n return (entity: Entity) => {\n if (predicate.kind && !strCmpAll(entity.kind, predicate.kind)) {\n return false;\n }\n\n if (predicate.type && !strCmpAll(entity.spec?.type, predicate.type)) {\n return false;\n }\n\n // there's no type check, return true\n return true;\n };\n}\n\n/**\n * For use in EntitySwitch.Case. Matches if the entity is in a given namespace.\n * @public\n */\nexport function isNamespace(namespaces: string | string[]) {\n return (entity: Entity) => strCmpAll(entity.metadata?.namespace, namespaces);\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 { CatalogFilterLayout } from '@backstage/plugin-catalog-react';\n\n/**\n * @public\n * @deprecated Use `CatalogFilterLayout` from `@backstage/plugin-catalog-react` instead.\n */\nexport const FilteredEntityLayout = CatalogFilterLayout as (props: {\n children: React.ReactNode;\n}) => JSX.Element;\n\n/**\n * @public\n * @deprecated Use `CatalogFilterLayout.Filters` from `@backstage/plugin-catalog-react` instead.\n */\nexport const FilterContainer = CatalogFilterLayout.Filters;\n\n/**\n * @public\n * @deprecated Use `CatalogFilterLayout.Content` from `@backstage/plugin-catalog-react` instead.\n */\nexport const EntityListContainer = CatalogFilterLayout.Content;\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 { CatalogClient } from '@backstage/catalog-client';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n entityPresentationApiRef,\n entityRouteRef,\n starredEntitiesApiRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n createComponentRouteRef,\n createFromTemplateRouteRef,\n unregisterRedirectRouteRef,\n viewTechDocRouteRef,\n} from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n storageApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { DefaultStarredEntitiesApi } from './apis';\nimport { AboutCardProps } from './components/AboutCard';\nimport { DefaultCatalogPageProps } from './components/CatalogPage';\nimport { DependencyOfComponentsCardProps } from './components/DependencyOfComponentsCard';\nimport { DependsOnComponentsCardProps } from './components/DependsOnComponentsCard';\nimport { DependsOnResourcesCardProps } from './components/DependsOnResourcesCard';\nimport { HasComponentsCardProps } from './components/HasComponentsCard';\nimport { HasResourcesCardProps } from './components/HasResourcesCard';\nimport { HasSubcomponentsCardProps } from './components/HasSubcomponentsCard';\nimport { HasSystemsCardProps } from './components/HasSystemsCard';\nimport { RelatedEntitiesCardProps } from './components/RelatedEntitiesCard';\nimport { CatalogSearchResultListItemProps } from './components/CatalogSearchResultListItem';\nimport { rootRouteRef } from './routes';\nimport { DefaultEntityPresentationApi } from './apis/EntityPresentationApi';\n\n/** @public */\nexport const catalogPlugin = createPlugin({\n id: 'catalog',\n apis: [\n createApiFactory({\n api: catalogApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogClient({ discoveryApi, fetchApi }),\n }),\n createApiFactory({\n api: starredEntitiesApiRef,\n deps: { storageApi: storageApiRef },\n factory: ({ storageApi }) =>\n new DefaultStarredEntitiesApi({ storageApi }),\n }),\n createApiFactory({\n api: entityPresentationApiRef,\n deps: { catalogApi: catalogApiRef },\n factory: ({ catalogApi }) =>\n DefaultEntityPresentationApi.create({ catalogApi }),\n }),\n ],\n routes: {\n catalogIndex: rootRouteRef,\n catalogEntity: entityRouteRef,\n },\n externalRoutes: {\n createComponent: createComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n createFromTemplate: createFromTemplateRouteRef,\n unregisterRedirect: unregisterRedirectRouteRef,\n },\n});\n\n/** @public */\nexport const CatalogIndexPage: (props: DefaultCatalogPageProps) => JSX.Element =\n catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogIndexPage',\n component: () =>\n import('./components/CatalogPage').then(m => m.CatalogPage),\n mountPoint: rootRouteRef,\n }),\n );\n\n/** @public */\nexport const CatalogEntityPage: () => JSX.Element = catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogEntityPage',\n component: () =>\n import('./components/CatalogEntityPage').then(m => m.CatalogEntityPage),\n mountPoint: entityRouteRef,\n }),\n);\n\n/** @public */\nexport const EntityAboutCard: (props: AboutCardProps) => JSX.Element =\n catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityAboutCard',\n component: {\n lazy: () => import('./components/AboutCard').then(m => m.AboutCard),\n },\n }),\n );\n\n/** @public */\nexport const EntityLinksCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLinksCard',\n component: {\n lazy: () =>\n import('./components/EntityLinksCard').then(m => m.EntityLinksCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityLabelsCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLabelsCard',\n component: {\n lazy: () =>\n import('./components/EntityLabelsCard').then(m => m.EntityLabelsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSystemsCard: (props: HasSystemsCardProps) => JSX.Element =\n catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSystemsCard',\n component: {\n lazy: () =>\n import('./components/HasSystemsCard').then(m => m.HasSystemsCard),\n },\n }),\n );\n\n/** @public */\nexport const EntityHasComponentsCard: (\n props: HasComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasComponentsCard',\n component: {\n lazy: () =>\n import('./components/HasComponentsCard').then(m => m.HasComponentsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSubcomponentsCard: (\n props: HasSubcomponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSubcomponentsCard',\n component: {\n lazy: () =>\n import('./components/HasSubcomponentsCard').then(\n m => m.HasSubcomponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasResourcesCard: (\n props: HasResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasResourcesCard',\n component: {\n lazy: () =>\n import('./components/HasResourcesCard').then(m => m.HasResourcesCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnComponentsCard: (\n props: DependsOnComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependsOnComponentsCard').then(\n m => m.DependsOnComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependencyOfComponentsCard: (\n props: DependencyOfComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependencyOfComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependencyOfComponentsCard').then(\n m => m.DependencyOfComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnResourcesCard: (\n props: DependsOnResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnResourcesCard',\n component: {\n lazy: () =>\n import('./components/DependsOnResourcesCard').then(\n m => m.DependsOnResourcesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const RelatedEntitiesCard: <T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'RelatedEntitiesCard',\n component: {\n lazy: () =>\n import('./components/RelatedEntitiesCard').then(\n m => m.RelatedEntitiesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const CatalogSearchResultListItem: (\n props: SearchResultListItemExtensionProps<CatalogSearchResultListItemProps>,\n) => JSX.Element | null = catalogPlugin.provide(\n createSearchResultListItemExtension({\n name: 'CatalogSearchResultListItem',\n component: () =>\n import('./components/CatalogSearchResultListItem').then(\n m => m.CatalogSearchResultListItem,\n ),\n predicate: result => result.type === 'software-catalog',\n }),\n);\n"],"names":["_a","_b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,SAAS,WAId,GAAA;AACA,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AAEvC,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAO,EAAA,QAAA;AAAA,GACT,GAAI,SAAS,YAAY;AACvB,IAAA,MAAM,KAAQ,GAAA,MAAM,UACjB,CAAA,eAAA,CAAgB,EAAE,MAAA,EAAQ,CAAC,MAAM,CAAE,EAAC,CACpC,CAAA,IAAA,CAAK,CAAS,QAAA,KAAA;AArCrB,MAAA,IAAA,EAAA,CAAA;AAqCwB,MAAS,OAAA,CAAA,CAAA,EAAA,GAAA,QAAA,CAAA,MAAA,CAAO,SAAhB,IAAsB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,GAAA,CAAI,OAAK,CAAE,CAAA,KAAA,CAAA,CAAO,WAAU,EAAC,CAAA;AAAA,KAAC,CAAA,CAAA;AACxE,IAAO,OAAA,KAAA,CAAA;AAAA,GACT,EAAG,CAAC,UAAU,CAAC,CAAA,CAAA;AAEf,EAAA,OAAO,EAAE,OAAS,EAAA,KAAA,EAAO,QAAU,EAAA,QAAA,IAAA,IAAA,GAAA,QAAA,GAAY,EAAG,EAAA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A;AAAA,GACtC,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog",
3
- "version": "1.18.1",
3
+ "version": "1.18.2",
4
4
  "description": "The Backstage plugin for browsing the Backstage catalog",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin"
@@ -49,20 +49,20 @@
49
49
  "test": "backstage-cli package test"
50
50
  },
51
51
  "dependencies": {
52
- "@backstage/catalog-client": "^1.6.2",
52
+ "@backstage/catalog-client": "^1.6.3",
53
53
  "@backstage/catalog-model": "^1.4.5",
54
- "@backstage/core-compat-api": "^0.2.2",
55
- "@backstage/core-components": "^0.14.2",
54
+ "@backstage/core-compat-api": "^0.2.3",
55
+ "@backstage/core-components": "^0.14.3",
56
56
  "@backstage/core-plugin-api": "^1.9.1",
57
57
  "@backstage/errors": "^1.2.4",
58
- "@backstage/frontend-plugin-api": "^0.6.2",
58
+ "@backstage/frontend-plugin-api": "^0.6.3",
59
59
  "@backstage/integration-react": "^1.1.25",
60
60
  "@backstage/plugin-catalog-common": "^1.0.22",
61
- "@backstage/plugin-catalog-react": "^1.11.1",
61
+ "@backstage/plugin-catalog-react": "^1.11.2",
62
62
  "@backstage/plugin-permission-react": "^0.4.21",
63
63
  "@backstage/plugin-scaffolder-common": "^1.5.1",
64
64
  "@backstage/plugin-search-common": "^1.2.11",
65
- "@backstage/plugin-search-react": "^1.7.8",
65
+ "@backstage/plugin-search-react": "^1.7.9",
66
66
  "@backstage/types": "^1.1.1",
67
67
  "@material-ui/core": "^4.12.2",
68
68
  "@material-ui/icons": "^4.9.1",
@@ -78,11 +78,11 @@
78
78
  "zen-observable": "^0.10.0"
79
79
  },
80
80
  "devDependencies": {
81
- "@backstage/cli": "^0.26.1",
82
- "@backstage/core-app-api": "^1.12.2",
83
- "@backstage/dev-utils": "^1.0.29",
81
+ "@backstage/cli": "^0.26.2",
82
+ "@backstage/core-app-api": "^1.12.3",
83
+ "@backstage/dev-utils": "^1.0.30",
84
84
  "@backstage/plugin-permission-common": "^0.7.13",
85
- "@backstage/test-utils": "^1.5.2",
85
+ "@backstage/test-utils": "^1.5.3",
86
86
  "@testing-library/dom": "^9.0.0",
87
87
  "@testing-library/jest-dom": "^6.0.0",
88
88
  "@testing-library/react": "^14.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"CatalogTable-BvyJNYOs.esm.js","sources":["../../src/components/CatalogTable/columns.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 return {\n title: options?.title || 'Label',\n field: 'entity.metadata.labels',\n cellStyle: {\n padding: '0px 16px 0px 20px',\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 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 {\n EntityTextFilter,\n useEntityList,\n} from '@backstage/plugin-catalog-react';\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 const { updateFilters } = useEntityList();\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 onSearchChange={(searchText: string) =>\n updateFilters({\n text: searchText ? new EntityTextFilter(searchText) : undefined,\n })\n }\n onPageChange={page => {\n if (page > 0) {\n next?.();\n } else {\n prev?.();\n }\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={title}\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,CAA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