@backstage/plugin-catalog 1.17.0-next.2 → 1.17.0-next.3

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,31 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.17.0-next.3
4
+
5
+ ### Minor Changes
6
+
7
+ - 1f8c2fa: Add entity warning components to the default entity overview page.
8
+
9
+ ### Patch Changes
10
+
11
+ - 172a717: Fix entity content extension filtering.
12
+ - Updated dependencies
13
+ - @backstage/core-components@0.14.0-next.2
14
+ - @backstage/plugin-catalog-react@1.10.0-next.3
15
+ - @backstage/catalog-client@1.6.0-next.1
16
+ - @backstage/catalog-model@1.4.4-next.0
17
+ - @backstage/core-compat-api@0.2.0-next.3
18
+ - @backstage/core-plugin-api@1.9.0-next.1
19
+ - @backstage/errors@1.2.3
20
+ - @backstage/frontend-plugin-api@0.6.0-next.3
21
+ - @backstage/integration-react@1.1.24-next.2
22
+ - @backstage/types@1.1.1
23
+ - @backstage/plugin-catalog-common@1.0.21-next.0
24
+ - @backstage/plugin-permission-react@0.4.20-next.1
25
+ - @backstage/plugin-scaffolder-common@1.5.0-next.1
26
+ - @backstage/plugin-search-common@1.2.10
27
+ - @backstage/plugin-search-react@1.7.6-next.3
28
+
3
29
  ## 1.17.0-next.2
4
30
 
5
31
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog",
3
- "version": "1.17.0-next.2",
3
+ "version": "1.17.0-next.3",
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,14 +1,8 @@
1
- import { convertLegacyRouteRef, compatWrapper, convertLegacyRouteRefs } from '@backstage/core-compat-api';
2
- import { createApiExtension, createPageExtension, createExtensionInput, coreExtensionData, createExtension, ExtensionBoundary, createSchemaFromZod, createNavItemExtension, createPlugin } from '@backstage/frontend-plugin-api';
3
- import { catalogApiRef, starredEntitiesApiRef, entityRouteRef, AsyncEntityProvider } from '@backstage/plugin-catalog-react';
4
- import { D as DefaultStarredEntitiesApi, r as rootRouteRef, v as viewTechDocRouteRef, c as createComponentRouteRef, b as createFromTemplateRouteRef, u as unregisterRedirectRouteRef } from './esm/routes-6e97578f.esm.js';
5
- import { createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef } from '@backstage/core-plugin-api';
6
- import { CatalogClient } from '@backstage/catalog-client';
7
- import React, { lazy } from 'react';
8
- import { catalogExtensionData, createEntityCardExtension, createEntityContentExtension } from '@backstage/plugin-catalog-react/alpha';
9
- import { u as useEntityFromUrl } from './esm/useEntityFromUrl-59c4a128.esm.js';
10
- import HomeIcon from '@material-ui/icons/Home';
11
- import { createSearchResultListItemExtension } from '@backstage/plugin-search-react/alpha';
1
+ export { c as createCatalogFilterExtension, p as default } from './esm/alpha-625f1fc3.esm.js';
2
+ import '@backstage/core-compat-api';
3
+ import '@backstage/frontend-plugin-api';
4
+ import '@backstage/plugin-catalog-react';
5
+ import './esm/routes-6e97578f.esm.js';
12
6
  import '@backstage/catalog-model';
13
7
  import '@backstage/types';
14
8
  import 'dataloader';
@@ -24,298 +18,15 @@ import '@material-ui/icons/People';
24
18
  import '@material-ui/icons/Person';
25
19
  import '@material-ui/icons/Storage';
26
20
  import 'lodash';
21
+ import '@backstage/core-plugin-api';
22
+ import '@backstage/catalog-client';
23
+ import 'react';
24
+ import '@backstage/plugin-catalog-react/alpha';
25
+ import './esm/useEntityFromUrl-59c4a128.esm.js';
27
26
  import 'react-router-dom';
28
27
  import 'react-use/lib/useAsyncRetry';
29
-
30
- const catalogApi = createApiExtension({
31
- factory: createApiFactory({
32
- api: catalogApiRef,
33
- deps: {
34
- discoveryApi: discoveryApiRef,
35
- fetchApi: fetchApiRef
36
- },
37
- factory: ({ discoveryApi, fetchApi }) => new CatalogClient({ discoveryApi, fetchApi })
38
- })
39
- });
40
- const catalogStarredEntitiesApi = createApiExtension({
41
- factory: createApiFactory({
42
- api: starredEntitiesApiRef,
43
- deps: { storageApi: storageApiRef },
44
- factory: ({ storageApi }) => new DefaultStarredEntitiesApi({ storageApi })
45
- })
46
- });
47
- var apis = [catalogApi, catalogStarredEntitiesApi];
48
-
49
- const catalogPage = createPageExtension({
50
- defaultPath: "/catalog",
51
- routeRef: convertLegacyRouteRef(rootRouteRef),
52
- inputs: {
53
- filters: createExtensionInput({
54
- element: coreExtensionData.reactElement
55
- })
56
- },
57
- loader: async ({ inputs }) => {
58
- const { BaseCatalogPage } = await import('./esm/index-6defd532.esm.js');
59
- const filters = inputs.filters.map((filter) => filter.output.element);
60
- return compatWrapper(/* @__PURE__ */ React.createElement(BaseCatalogPage, { filters: /* @__PURE__ */ React.createElement(React.Fragment, null, filters) }));
61
- }
62
- });
63
- const catalogEntityPage = createPageExtension({
64
- name: "entity",
65
- defaultPath: "/catalog/:namespace/:kind/:name",
66
- routeRef: convertLegacyRouteRef(entityRouteRef),
67
- inputs: {
68
- contents: createExtensionInput({
69
- element: coreExtensionData.reactElement,
70
- path: coreExtensionData.routePath,
71
- routeRef: coreExtensionData.routeRef.optional(),
72
- title: catalogExtensionData.entityContentTitle
73
- })
74
- },
75
- loader: async ({ inputs }) => {
76
- const { EntityLayout } = await import('./esm/index-ac18d30d.esm.js');
77
- const Component = () => {
78
- return /* @__PURE__ */ React.createElement(AsyncEntityProvider, { ...useEntityFromUrl() }, /* @__PURE__ */ React.createElement(EntityLayout, null, inputs.contents.map((content) => /* @__PURE__ */ React.createElement(
79
- EntityLayout.Route,
80
- {
81
- key: content.output.path,
82
- path: content.output.path,
83
- title: content.output.title
84
- },
85
- content.output.element
86
- ))));
87
- };
88
- return compatWrapper(/* @__PURE__ */ React.createElement(Component, null));
89
- }
90
- });
91
- var pages = [catalogPage, catalogEntityPage];
92
-
93
- function createCatalogFilterExtension(options) {
94
- var _a;
95
- return createExtension({
96
- kind: "catalog-filter",
97
- namespace: options.namespace,
98
- name: options.name,
99
- attachTo: { id: "page:catalog", input: "filters" },
100
- inputs: (_a = options.inputs) != null ? _a : {},
101
- configSchema: options.configSchema,
102
- output: {
103
- element: coreExtensionData.reactElement
104
- },
105
- factory({ config, node }) {
106
- const ExtensionComponent = lazy(
107
- () => options.loader({ config }).then((element) => ({ default: () => element }))
108
- );
109
- return {
110
- element: /* @__PURE__ */ React.createElement(ExtensionBoundary, { node }, /* @__PURE__ */ React.createElement(ExtensionComponent, null))
111
- };
112
- }
113
- });
114
- }
115
-
116
- const catalogTagCatalogFilter = createCatalogFilterExtension({
117
- name: "tag",
118
- loader: async () => {
119
- const { EntityTagPicker } = await import('@backstage/plugin-catalog-react');
120
- return /* @__PURE__ */ React.createElement(EntityTagPicker, null);
121
- }
122
- });
123
- const catalogKindCatalogFilter = createCatalogFilterExtension({
124
- name: "kind",
125
- configSchema: createSchemaFromZod(
126
- (z) => z.object({
127
- initialFilter: z.string().default("component")
128
- })
129
- ),
130
- loader: async ({ config }) => {
131
- const { EntityKindPicker } = await import('@backstage/plugin-catalog-react');
132
- return /* @__PURE__ */ React.createElement(EntityKindPicker, { initialFilter: config.initialFilter });
133
- }
134
- });
135
- const catalogTypeCatalogFilter = createCatalogFilterExtension({
136
- name: "type",
137
- loader: async () => {
138
- const { EntityTypePicker } = await import('@backstage/plugin-catalog-react');
139
- return /* @__PURE__ */ React.createElement(EntityTypePicker, null);
140
- }
141
- });
142
- const catalogModeCatalogFilter = createCatalogFilterExtension({
143
- name: "mode",
144
- configSchema: createSchemaFromZod(
145
- (z) => z.object({
146
- mode: z.enum(["owners-only", "all"]).optional()
147
- })
148
- ),
149
- loader: async ({ config }) => {
150
- const { EntityOwnerPicker } = await import('@backstage/plugin-catalog-react');
151
- return /* @__PURE__ */ React.createElement(EntityOwnerPicker, { mode: config.mode });
152
- }
153
- });
154
- const catalogNamespaceCatalogFilter = createCatalogFilterExtension({
155
- name: "namespace",
156
- loader: async () => {
157
- const { EntityNamespacePicker } = await import('@backstage/plugin-catalog-react');
158
- return /* @__PURE__ */ React.createElement(EntityNamespacePicker, null);
159
- }
160
- });
161
- const catalogLifecycleCatalogFilter = createCatalogFilterExtension({
162
- name: "lifecycle",
163
- loader: async () => {
164
- const { EntityLifecyclePicker } = await import('@backstage/plugin-catalog-react');
165
- return /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null);
166
- }
167
- });
168
- const catalogProcessingStatusCatalogFilter = createCatalogFilterExtension({
169
- name: "processing-status",
170
- loader: async () => {
171
- const { EntityProcessingStatusPicker } = await import('@backstage/plugin-catalog-react');
172
- return /* @__PURE__ */ React.createElement(EntityProcessingStatusPicker, null);
173
- }
174
- });
175
- const catalogListCatalogFilter = createCatalogFilterExtension({
176
- name: "list",
177
- configSchema: createSchemaFromZod(
178
- (z) => z.object({
179
- initialFilter: z.enum(["owned", "starred", "all"]).default("owned")
180
- })
181
- ),
182
- loader: async ({ config }) => {
183
- const { UserListPicker } = await import('@backstage/plugin-catalog-react');
184
- return /* @__PURE__ */ React.createElement(UserListPicker, { initialFilter: config.initialFilter });
185
- }
186
- });
187
- var filters = [
188
- catalogTagCatalogFilter,
189
- catalogKindCatalogFilter,
190
- catalogTypeCatalogFilter,
191
- catalogModeCatalogFilter,
192
- catalogNamespaceCatalogFilter,
193
- catalogLifecycleCatalogFilter,
194
- catalogProcessingStatusCatalogFilter,
195
- catalogListCatalogFilter
196
- ];
197
-
198
- const catalogNavItem = createNavItemExtension({
199
- routeRef: convertLegacyRouteRef(rootRouteRef),
200
- title: "Catalog",
201
- icon: HomeIcon
202
- });
203
- var navItems = [catalogNavItem];
204
-
205
- const catalogAboutEntityCard = createEntityCardExtension({
206
- name: "about",
207
- loader: async () => import('./esm/index-fcc6ada1.esm.js').then(
208
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.AboutCard, { variant: "gridItem" }))
209
- )
210
- });
211
- const catalogLinksEntityCard = createEntityCardExtension({
212
- name: "links",
213
- filter: "has:links",
214
- loader: async () => import('./esm/index-a2f43c63.esm.js').then(
215
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.EntityLinksCard, { variant: "gridItem" }))
216
- )
217
- });
218
- const catalogLabelsEntityCard = createEntityCardExtension({
219
- name: "labels",
220
- filter: "has:labels",
221
- loader: async () => import('./esm/index-1819df86.esm.js').then(
222
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.EntityLabelsCard, { variant: "gridItem" }))
223
- )
224
- });
225
- const catalogDependsOnComponentsEntityCard = createEntityCardExtension({
226
- name: "depends-on-components",
227
- loader: async () => import('./esm/index-5d579387.esm.js').then(
228
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.DependsOnComponentsCard, { variant: "gridItem" }))
229
- )
230
- });
231
- const catalogDependsOnResourcesEntityCard = createEntityCardExtension({
232
- name: "depends-on-resources",
233
- loader: async () => import('./esm/index-2ae6a112.esm.js').then(
234
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.DependsOnResourcesCard, { variant: "gridItem" }))
235
- )
236
- });
237
- const catalogHasComponentsEntityCard = createEntityCardExtension({
238
- name: "has-components",
239
- loader: async () => import('./esm/index-151a7b53.esm.js').then(
240
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.HasComponentsCard, { variant: "gridItem" }))
241
- )
242
- });
243
- const catalogHasResourcesEntityCard = createEntityCardExtension({
244
- name: "has-resources",
245
- loader: async () => import('./esm/index-457f1bef.esm.js').then(
246
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.HasResourcesCard, { variant: "gridItem" }))
247
- )
248
- });
249
- const catalogHasSubcomponentsEntityCard = createEntityCardExtension({
250
- name: "has-subcomponents",
251
- loader: async () => import('./esm/index-df2397a2.esm.js').then(
252
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.HasSubcomponentsCard, { variant: "gridItem" }))
253
- )
254
- });
255
- const catalogHasSystemsEntityCard = createEntityCardExtension({
256
- name: "has-systems",
257
- loader: async () => import('./esm/index-b87e664e.esm.js').then(
258
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.HasSystemsCard, { variant: "gridItem" }))
259
- )
260
- });
261
- var entityCards = [
262
- catalogAboutEntityCard,
263
- catalogLinksEntityCard,
264
- catalogLabelsEntityCard,
265
- catalogDependsOnComponentsEntityCard,
266
- catalogDependsOnResourcesEntityCard,
267
- catalogHasComponentsEntityCard,
268
- catalogHasResourcesEntityCard,
269
- catalogHasSubcomponentsEntityCard,
270
- catalogHasSystemsEntityCard
271
- ];
272
-
273
- const catalogOverviewEntityContent = createEntityContentExtension({
274
- name: "overview",
275
- defaultPath: "/",
276
- defaultTitle: "Overview",
277
- disabled: false,
278
- inputs: {
279
- cards: createExtensionInput({
280
- element: coreExtensionData.reactElement,
281
- filterFunction: catalogExtensionData.entityFilterFunction.optional(),
282
- filterExpression: catalogExtensionData.entityFilterExpression.optional()
283
- })
284
- },
285
- loader: async ({ inputs }) => import('./esm/EntityOverviewPage-f61e50bf.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.EntityOverviewPage, { cards: inputs.cards.map((c) => c.output) }))
286
- });
287
- var entityContents = [catalogOverviewEntityContent];
288
-
289
- const catalogSearchResultListItem = createSearchResultListItemExtension({
290
- predicate: (result) => result.type === "software-catalog",
291
- component: () => import('./esm/index-a73e6d8d.esm.js').then(
292
- (m) => m.CatalogSearchResultListItem
293
- )
294
- });
295
- var searchResultItems = [catalogSearchResultListItem];
296
-
297
- var plugin = createPlugin({
298
- id: "catalog",
299
- routes: convertLegacyRouteRefs({
300
- catalogIndex: rootRouteRef,
301
- catalogEntity: entityRouteRef
302
- }),
303
- externalRoutes: convertLegacyRouteRefs({
304
- viewTechDoc: viewTechDocRouteRef,
305
- createComponent: createComponentRouteRef,
306
- createFromTemplate: createFromTemplateRouteRef,
307
- unregisterRedirect: unregisterRedirectRouteRef
308
- }),
309
- extensions: [
310
- ...apis,
311
- ...pages,
312
- ...filters,
313
- ...navItems,
314
- ...entityCards,
315
- ...entityContents,
316
- ...searchResultItems
317
- ]
318
- });
319
-
320
- export { createCatalogFilterExtension, plugin as default };
28
+ import '@material-ui/core/Grid';
29
+ import '@backstage/errors';
30
+ import '@material-ui/icons/Home';
31
+ import '@backstage/plugin-search-react/alpha';
321
32
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha/apis.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 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';\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 }),\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(content => (\n <EntityLayout.Route\n key={content.output.path}\n path={content.output.path}\n title={content.output.title}\n >\n {content.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":[],"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;;AChB9C,MAAM,cAAc,mBAAoB,CAAA;AAAA,EAC7C,WAAa,EAAA,UAAA;AAAA,EACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,EAC5C,MAAQ,EAAA;AAAA,IACN,SAAS,oBAAqB,CAAA;AAAA,MAC5B,SAAS,iBAAkB,CAAA,YAAA;AAAA,KAC5B,CAAA;AAAA,GACH;AAAA,EACA,MAAQ,EAAA,OAAO,EAAE,MAAA,EAAa,KAAA;AAC5B,IAAA,MAAM,EAAE,eAAA,EAAoB,GAAA,MAAM,OAAO,6BAA2B,CAAA,CAAA;AACpE,IAAA,MA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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;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,45 @@
1
+ import { useEntity } from '@backstage/plugin-catalog-react';
2
+ import Grid from '@material-ui/core/Grid';
3
+ import React from 'react';
4
+ import { F as FilterWrapper } from './alpha-625f1fc3.esm.js';
5
+ import { d as EntitySwitch, i as isOrphan, E as EntityOrphanWarning, h as hasRelationWarnings, a as EntityRelationWarning, c as hasCatalogProcessingErrors, b as EntityProcessingErrorsPanel } from './EntitySwitch-b8889a58.esm.js';
6
+ import '@backstage/core-compat-api';
7
+ import '@backstage/frontend-plugin-api';
8
+ import './routes-6e97578f.esm.js';
9
+ import '@backstage/catalog-model';
10
+ import '@backstage/types';
11
+ import 'dataloader';
12
+ import 'expiry-map';
13
+ import 'zen-observable';
14
+ import '@material-ui/icons/Apartment';
15
+ import '@material-ui/icons/Category';
16
+ import '@material-ui/icons/Extension';
17
+ import '@material-ui/icons/FeaturedPlayList';
18
+ import '@material-ui/icons/LocationOn';
19
+ import '@material-ui/icons/Memory';
20
+ import '@material-ui/icons/People';
21
+ import '@material-ui/icons/Person';
22
+ import '@material-ui/icons/Storage';
23
+ import 'lodash';
24
+ import '@backstage/core-plugin-api';
25
+ import '@backstage/catalog-client';
26
+ import '@backstage/plugin-catalog-react/alpha';
27
+ import './useEntityFromUrl-59c4a128.esm.js';
28
+ import 'react-router-dom';
29
+ import 'react-use/lib/useAsyncRetry';
30
+ import '@backstage/errors';
31
+ import '@material-ui/icons/Home';
32
+ import '@backstage/plugin-search-react/alpha';
33
+ import '@material-ui/lab';
34
+ import '@material-ui/core';
35
+ import 'react-use/lib/useAsync';
36
+ import '@backstage/core-components';
37
+
38
+ const entityWarningContent = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(EntitySwitch, null, /* @__PURE__ */ React.createElement(EntitySwitch.Case, { if: isOrphan }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(EntityOrphanWarning, null)))), /* @__PURE__ */ React.createElement(EntitySwitch, null, /* @__PURE__ */ React.createElement(EntitySwitch.Case, { if: hasRelationWarnings }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(EntityRelationWarning, null)))), /* @__PURE__ */ React.createElement(EntitySwitch, null, /* @__PURE__ */ React.createElement(EntitySwitch.Case, { if: hasCatalogProcessingErrors }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(EntityProcessingErrorsPanel, null)))));
39
+ function EntityOverviewPage(props) {
40
+ const { entity } = useEntity();
41
+ return /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3, alignItems: "stretch" }, entityWarningContent, props.cards.map((card, index) => /* @__PURE__ */ React.createElement(FilterWrapper, { key: index, entity, ...card })));
42
+ }
43
+
44
+ export { EntityOverviewPage };
45
+ //# sourceMappingURL=EntityOverviewPage-c55a4309.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityOverviewPage-c55a4309.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,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