@backstage/plugin-catalog 1.6.2-next.1 → 1.7.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,46 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.7.0-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-components@0.12.1-next.3
9
+ - @backstage/catalog-client@1.2.0-next.1
10
+ - @backstage/catalog-model@1.1.4-next.1
11
+ - @backstage/core-plugin-api@1.2.0-next.2
12
+ - @backstage/errors@1.1.4-next.1
13
+ - @backstage/integration-react@1.1.7-next.3
14
+ - @backstage/theme@0.2.16
15
+ - @backstage/types@1.0.2-next.1
16
+ - @backstage/plugin-catalog-common@1.0.9-next.2
17
+ - @backstage/plugin-catalog-react@1.2.2-next.3
18
+ - @backstage/plugin-search-common@1.2.0-next.2
19
+ - @backstage/plugin-search-react@1.3.0-next.3
20
+
21
+ ## 1.7.0-next.2
22
+
23
+ ### Minor Changes
24
+
25
+ - 6ffa47bb0a: Fixes in kind selectors (now `OwnershipCard` works again). `EntityKindPicker` now accepts an optional `allowedKinds` prop, just like `CatalogKindHeader`.
26
+ - 462c1d012e: Removed `CatalogKindHeader` from `DefaultCatalogPage`. Deprecated `CatalogKindHeader` in favour of `EntityKindPicker`.
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies
31
+ - @backstage/core-plugin-api@1.2.0-next.2
32
+ - @backstage/plugin-search-react@1.3.0-next.2
33
+ - @backstage/core-components@0.12.1-next.2
34
+ - @backstage/plugin-catalog-react@1.2.2-next.2
35
+ - @backstage/plugin-search-common@1.2.0-next.2
36
+ - @backstage/integration-react@1.1.7-next.2
37
+ - @backstage/catalog-client@1.2.0-next.1
38
+ - @backstage/catalog-model@1.1.4-next.1
39
+ - @backstage/errors@1.1.4-next.1
40
+ - @backstage/theme@0.2.16
41
+ - @backstage/types@1.0.2-next.1
42
+ - @backstage/plugin-catalog-common@1.0.9-next.2
43
+
3
44
  ## 1.6.2-next.1
4
45
 
5
46
  ### Patch Changes
@@ -3,7 +3,7 @@ import { useOutlet } from 'react-router';
3
3
  import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton } from '@backstage/core-components';
4
4
  import { usePluginOptions, useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
5
5
  import { EntityListProvider, CatalogFilterLayout, EntityKindPicker, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker, EntityProcessingStatusPicker } from '@backstage/plugin-catalog-react';
6
- import { c as createComponentRouteRef, C as CatalogKindHeader, a as CatalogTable } from './index-d0e9bb6d.esm.js';
6
+ import { c as createComponentRouteRef, C as CatalogTable } from './index-3507149b.esm.js';
7
7
  import 'zen-observable';
8
8
  import '@backstage/catalog-model';
9
9
  import 'lodash';
@@ -13,8 +13,8 @@ import '@material-ui/icons/Cached';
13
13
  import '@material-ui/icons/Description';
14
14
  import '@material-ui/icons/Edit';
15
15
  import '@material-ui/icons/Language';
16
- import 'react-use/lib/useAsync';
17
16
  import 'pluralize';
17
+ import 'react-use/lib/useAsync';
18
18
  import '@backstage/plugin-search-react';
19
19
  import '@material-ui/core/styles';
20
20
  import '@material-ui/icons/OpenInNew';
@@ -44,20 +44,13 @@ function DefaultCatalogPage(props) {
44
44
  const orgName = (_a = useApi(configApiRef).getOptionalString("organization.name")) != null ? _a : "Backstage";
45
45
  const createComponentLink = useRouteRef(createComponentRouteRef);
46
46
  const { createButtonTitle } = useCatalogPluginOptions();
47
- return /* @__PURE__ */ React.createElement(PageWithHeader, { title: `${orgName} Catalog`, themeId: "home" }, /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(
48
- ContentHeader,
47
+ return /* @__PURE__ */ React.createElement(PageWithHeader, { title: `${orgName} Catalog`, themeId: "home" }, /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, { title: "" }, /* @__PURE__ */ React.createElement(
48
+ CreateButton,
49
49
  {
50
- titleComponent: /* @__PURE__ */ React.createElement(CatalogKindHeader, { initialFilter: initialKind })
51
- },
52
- /* @__PURE__ */ React.createElement(
53
- CreateButton,
54
- {
55
- title: createButtonTitle,
56
- to: createComponentLink && createComponentLink()
57
- }
58
- ),
59
- /* @__PURE__ */ React.createElement(SupportButton, null, "All your software catalog entities")
60
- ), /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(EntityKindPicker, { initialFilter: initialKind }), /* @__PURE__ */ React.createElement(EntityTypePicker, null), /* @__PURE__ */ React.createElement(UserListPicker, { initialFilter: initiallySelectedFilter }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null), /* @__PURE__ */ React.createElement(EntityProcessingStatusPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(
50
+ title: createButtonTitle,
51
+ to: createComponentLink && createComponentLink()
52
+ }
53
+ ), /* @__PURE__ */ React.createElement(SupportButton, null, "All your software catalog entities")), /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(EntityKindPicker, { initialFilter: initialKind }), /* @__PURE__ */ React.createElement(EntityTypePicker, null), /* @__PURE__ */ React.createElement(UserListPicker, { initialFilter: initiallySelectedFilter }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null), /* @__PURE__ */ React.createElement(EntityProcessingStatusPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(
61
54
  CatalogTable,
62
55
  {
63
56
  columns,
@@ -74,4 +67,4 @@ function CatalogPage(props) {
74
67
  }
75
68
 
76
69
  export { CatalogPage, DefaultCatalogPage };
77
- //# sourceMappingURL=index-426b309d.esm.js.map
70
+ //# sourceMappingURL=index-1e61b53b.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-1e61b53b.esm.js","sources":["../../src/options.ts","../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { usePluginOptions } from '@backstage/core-plugin-api';\n\nexport type CatalogPluginOptions = {\n createButtonTitle: string;\n};\n\n/** @ignore */\nexport type CatalogInputPluginOptions = {\n createButtonTitle: string;\n};\n\nexport const useCatalogPluginOptions = () =>\n usePluginOptions<CatalogPluginOptions>();\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 EntityLifecyclePicker,\n EntityListProvider,\n EntityProcessingStatusPicker,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n EntityKindPicker,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { useCatalogPluginOptions } from '../../options';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n const { createButtonTitle } = useCatalogPluginOptions();\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title={createButtonTitle}\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter={initialKind} />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n <EntityProcessingStatusPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\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';\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Ba,MAAA,uBAAA,GAA0B,MACrC,gBAAuC,EAAA;;AC6BlC,SAAS,mBAAmB,KAAgC,EAAA;AAzDnE,EAAA,IAAA,EAAA,CAAA;AA0DE,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,OAAA;AAAA,IACA,uBAA0B,GAAA,OAAA;AAAA,IAC1B,WAAc,GAAA,WAAA;AAAA,IACd,eAAe,EAAC;AAAA,IAChB,YAAA;AAAA,GACE,GAAA,KAAA,CAAA;AACJ,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;AAE/D,EAAM,MAAA,EAAE,iBAAkB,EAAA,GAAI,uBAAwB,EAAA,CAAA;AAEtD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,EAAe,KAAO,EAAA,CAAA,EAAG,OAAmB,CAAA,QAAA,CAAA,EAAA,OAAA,EAAQ,MACnD,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,OACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAM,EACnB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,iBAAA;AAAA,MACP,EAAA,EAAI,uBAAuB,mBAAoB,EAAA;AAAA,KAAA;AAAA,qBAEhD,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,EAAc,oCAAkC,CACnD,CAAA,sCACC,kBACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,2CACE,KAAA,CAAA,aAAA,CAAA,mBAAA,CAAoB,SAApB,IACC,kBAAA,KAAA,CAAA,aAAA,CAAC,oBAAiB,aAAe,EAAA,WAAA,EAAa,mBAC7C,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,IAAiB,mBACjB,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,EAAe,eAAe,uBAAyB,EAAA,CAAA,sCACvD,iBAAkB,EAAA,IAAA,CAAA,sCAClB,qBAAsB,EAAA,IAAA,CAAA,sCACtB,eAAgB,EAAA,IAAA,CAAA,sCAChB,4BAA6B,EAAA,IAAA,CAChC,mBACC,KAAA,CAAA,aAAA,CAAA,mBAAA,CAAoB,SAApB,IACC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,OAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KAAA;AAAA,GAEJ,CACF,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;ACnFO,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,18 +1,18 @@
1
1
  import ObservableImpl from 'zen-observable';
2
2
  import { stringifyEntityRef, RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation, ANNOTATION_EDIT_URL, DEFAULT_NAMESPACE, ANNOTATION_LOCATION, ANNOTATION_VIEW_URL } from '@backstage/catalog-model';
3
- import { isArray, isString, capitalize as capitalize$1 } from 'lodash';
3
+ import { isArray, isString, capitalize } from 'lodash';
4
4
  import { Link, HeaderIconLinkRow, OverflowTooltip, WarningPanel, CodeSnippet, Table, Page, Header, Progress, RoutedTabs, Content, HeaderLabel, ResponseErrorPanel } from '@backstage/core-components';
5
5
  import { createExternalRouteRef, createRouteRef, useElementFilter, useApi, alertApiRef, errorApiRef, useRouteRef, useAnalytics, attachComponentData, useRouteRefParams, useApiHolder, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
6
6
  import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
7
7
  import { getEntityRelations, EntityRefLinks, useEntity, catalogApiRef, getEntitySourceLocation as getEntitySourceLocation$1, useEntityList, EntityKindFilter, EntityRefLink, humanizeEntityRef, useStarredEntities, useEntityPermission, entityRouteRef, useAsyncEntity, UnregisterEntityDialog, InspectEntityDialog, FavoriteEntity, CatalogFilterLayout, starredEntitiesApiRef } from '@backstage/plugin-catalog-react';
8
- import { makeStyles, Typography, Grid, Box, useMediaQuery, ImageList, ImageListItem, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, capitalize, Select, InputBase, MenuItem, ListItem, ListItemIcon, ListItemText, Popover, MenuList, Dialog, DialogTitle, DialogActions, Button } from '@material-ui/core';
8
+ import { makeStyles, Typography, Grid, Box, useMediaQuery, ImageList, ImageListItem, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, Select, InputBase, MenuItem, ListItem, ListItemIcon, ListItemText, Popover, MenuList, Dialog, DialogTitle, DialogActions, Button } from '@material-ui/core';
9
9
  import CachedIcon from '@material-ui/icons/Cached';
10
10
  import DocsIcon from '@material-ui/icons/Description';
11
11
  import EditIcon from '@material-ui/icons/Edit';
12
12
  import React, { useCallback, useMemo, useState, useEffect } from 'react';
13
13
  import LanguageIcon from '@material-ui/icons/Language';
14
- import useAsync from 'react-use/lib/useAsync';
15
14
  import pluralize from 'pluralize';
15
+ import useAsync from 'react-use/lib/useAsync';
16
16
  import { HighlightedSearchResultText } from '@backstage/plugin-search-react';
17
17
  import { withStyles, makeStyles as makeStyles$1 } from '@material-ui/core/styles';
18
18
  import OpenInNew from '@material-ui/icons/OpenInNew';
@@ -416,6 +416,42 @@ function AboutCard(props) {
416
416
  ), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(CardContent, { className: cardContentClass }, /* @__PURE__ */ React.createElement(AboutContent, { entity })));
417
417
  }
418
418
 
419
+ function useAllKinds() {
420
+ const catalogApi = useApi(catalogApiRef);
421
+ const {
422
+ error,
423
+ loading,
424
+ value: allKinds
425
+ } = useAsync(async () => {
426
+ const items = await catalogApi.getEntityFacets({ facets: ["kind"] }).then((response) => {
427
+ var _a;
428
+ return ((_a = response.facets.kind) == null ? void 0 : _a.map((f) => f.value).sort()) || [];
429
+ });
430
+ return items;
431
+ }, [catalogApi]);
432
+ return { loading, error, allKinds: allKinds != null ? allKinds : [] };
433
+ }
434
+ function filterKinds(allKinds, allowedKinds, forcedKinds) {
435
+ let availableKinds = allKinds;
436
+ if (allowedKinds) {
437
+ availableKinds = availableKinds.filter(
438
+ (k) => allowedKinds.some(
439
+ (a) => a.toLocaleLowerCase("en-US") === k.toLocaleLowerCase("en-US")
440
+ )
441
+ );
442
+ }
443
+ if (forcedKinds && !allKinds.some(
444
+ (a) => a.toLocaleLowerCase("en-US") === forcedKinds.toLocaleLowerCase("en-US")
445
+ )) {
446
+ availableKinds = availableKinds.concat([forcedKinds]);
447
+ }
448
+ const kindsMap = availableKinds.sort().reduce((acc, kind) => {
449
+ acc[kind.toLocaleLowerCase("en-US")] = kind;
450
+ return acc;
451
+ }, {});
452
+ return kindsMap;
453
+ }
454
+
419
455
  const useStyles$2 = makeStyles(
420
456
  (theme) => createStyles({
421
457
  root: {
@@ -424,35 +460,31 @@ const useStyles$2 = makeStyles(
424
460
  })
425
461
  );
426
462
  function CatalogKindHeader(props) {
427
- var _a;
463
+ var _a, _b;
428
464
  const { initialFilter = "component", allowedKinds } = props;
429
465
  const classes = useStyles$2();
430
- const catalogApi = useApi(catalogApiRef);
431
- const { value: allKinds } = useAsync(async () => {
432
- return await catalogApi.getEntityFacets({ facets: ["kind"] }).then((response) => {
433
- var _a2;
434
- return ((_a2 = response.facets.kind) == null ? void 0 : _a2.map((f) => f.value).sort()) || [];
435
- });
436
- });
466
+ const { allKinds } = useAllKinds();
437
467
  const {
438
468
  filters,
439
469
  updateFilters,
440
470
  queryParameters: { kind: kindParameter }
441
471
  } = useEntityList();
442
472
  const queryParamKind = useMemo(
443
- () => {
444
- var _a2;
445
- return (_a2 = [kindParameter].flat()[0]) == null ? void 0 : _a2.toLocaleLowerCase("en-US");
446
- },
473
+ () => [kindParameter].flat()[0],
447
474
  [kindParameter]
448
475
  );
449
476
  const [selectedKind, setSelectedKind] = useState(
450
- queryParamKind != null ? queryParamKind : initialFilter
477
+ (_b = queryParamKind != null ? queryParamKind : (_a = filters.kind) == null ? void 0 : _a.value) != null ? _b : initialFilter
451
478
  );
452
479
  useEffect(() => {
453
- var _a2, _b;
480
+ if (queryParamKind) {
481
+ setSelectedKind(queryParamKind);
482
+ }
483
+ }, [queryParamKind]);
484
+ useEffect(() => {
485
+ var _a2, _b2;
454
486
  if ((_a2 = filters.kind) == null ? void 0 : _a2.value) {
455
- setSelectedKind((_b = filters.kind) == null ? void 0 : _b.value);
487
+ setSelectedKind((_b2 = filters.kind) == null ? void 0 : _b2.value);
456
488
  }
457
489
  }, [filters.kind]);
458
490
  useEffect(() => {
@@ -460,27 +492,12 @@ function CatalogKindHeader(props) {
460
492
  kind: selectedKind ? new EntityKindFilter(selectedKind) : void 0
461
493
  });
462
494
  }, [selectedKind, updateFilters]);
463
- useEffect(() => {
464
- if (queryParamKind) {
465
- setSelectedKind(queryParamKind);
466
- }
467
- }, [queryParamKind]);
468
- const availableKinds = [capitalize(selectedKind)].concat(
469
- (_a = allKinds == null ? void 0 : allKinds.filter(
470
- (k) => allowedKinds ? allowedKinds.some(
471
- (a) => a.toLocaleLowerCase("en-US") === k.toLocaleLowerCase("en-US")
472
- ) : true
473
- )) != null ? _a : []
474
- );
475
- const options = availableKinds.sort().reduce((acc, kind) => {
476
- acc[kind.toLocaleLowerCase("en-US")] = kind;
477
- return acc;
478
- }, {});
495
+ const options = filterKinds(allKinds, allowedKinds, selectedKind);
479
496
  return /* @__PURE__ */ React.createElement(
480
497
  Select,
481
498
  {
482
- input: /* @__PURE__ */ React.createElement(InputBase, { value: selectedKind }),
483
- value: selectedKind,
499
+ input: /* @__PURE__ */ React.createElement(InputBase, null),
500
+ value: selectedKind.toLocaleLowerCase("en-US"),
484
501
  onChange: (e) => setSelectedKind(e.target.value),
485
502
  classes
486
503
  },
@@ -732,7 +749,7 @@ const CatalogTable = (props) => {
732
749
  }
733
750
  }, [(_a = filters.kind) == null ? void 0 : _a.value]);
734
751
  const showTypeColumn = filters.type === void 0;
735
- const titlePreamble = capitalize$1((_c = (_b = filters.user) == null ? void 0 : _b.value) != null ? _c : "all");
752
+ const titlePreamble = capitalize((_c = (_b = filters.user) == null ? void 0 : _b.value) != null ? _c : "all");
736
753
  if (error) {
737
754
  return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
738
755
  WarningPanel,
@@ -1332,7 +1349,7 @@ const catalogPlugin = createPlugin({
1332
1349
  const CatalogIndexPage = catalogPlugin.provide(
1333
1350
  createRoutableExtension({
1334
1351
  name: "CatalogIndexPage",
1335
- component: () => import('./index-426b309d.esm.js').then((m) => m.CatalogPage),
1352
+ component: () => import('./index-1e61b53b.esm.js').then((m) => m.CatalogPage),
1336
1353
  mountPoint: rootRouteRef
1337
1354
  })
1338
1355
  );
@@ -1347,7 +1364,7 @@ const EntityAboutCard = catalogPlugin.provide(
1347
1364
  createComponentExtension({
1348
1365
  name: "EntityAboutCard",
1349
1366
  component: {
1350
- lazy: () => import('./index-031c6cd2.esm.js').then((m) => m.AboutCard)
1367
+ lazy: () => import('./index-e21aae6d.esm.js').then((m) => m.AboutCard)
1351
1368
  }
1352
1369
  })
1353
1370
  );
@@ -1355,7 +1372,7 @@ const EntityLinksCard = catalogPlugin.provide(
1355
1372
  createComponentExtension({
1356
1373
  name: "EntityLinksCard",
1357
1374
  component: {
1358
- lazy: () => import('./index-159203c1.esm.js').then((m) => m.EntityLinksCard)
1375
+ lazy: () => import('./index-6268b740.esm.js').then((m) => m.EntityLinksCard)
1359
1376
  }
1360
1377
  })
1361
1378
  );
@@ -1434,5 +1451,5 @@ const RelatedEntitiesCard = catalogPlugin.provide(
1434
1451
  })
1435
1452
  );
1436
1453
 
1437
- export { AboutCard as A, EntityListContainer as B, CatalogKindHeader as C, DefaultStarredEntitiesApi as D, EntityAboutCard as E, FilteredEntityLayout as F, LinksGridList as L, RelatedEntitiesCard as R, CatalogTable as a, AboutContent as b, createComponentRouteRef as c, AboutField as d, CatalogEntityPage as e, CatalogIndexPage as f, catalogPlugin as g, EntityDependencyOfComponentsCard as h, EntityDependsOnComponentsCard as i, EntityDependsOnResourcesCard as j, EntityHasComponentsCard as k, EntityHasResourcesCard as l, EntityHasSubcomponentsCard as m, EntityHasSystemsCard as n, EntityLinksCard as o, CatalogSearchResultListItem as p, EntityLayout as q, EntityOrphanWarning as r, isOrphan as s, EntityProcessingErrorsPanel as t, hasCatalogProcessingErrors as u, EntitySwitch as v, isKind as w, isNamespace as x, isComponentType as y, FilterContainer as z };
1438
- //# sourceMappingURL=index-d0e9bb6d.esm.js.map
1454
+ export { AboutCard as A, EntityListContainer as B, CatalogTable as C, DefaultStarredEntitiesApi as D, EntityAboutCard as E, FilteredEntityLayout as F, LinksGridList as L, RelatedEntitiesCard as R, AboutContent as a, AboutField as b, createComponentRouteRef as c, CatalogEntityPage as d, CatalogIndexPage as e, catalogPlugin as f, EntityDependencyOfComponentsCard as g, EntityDependsOnComponentsCard as h, EntityDependsOnResourcesCard as i, EntityHasComponentsCard as j, EntityHasResourcesCard as k, EntityHasSubcomponentsCard as l, EntityHasSystemsCard as m, EntityLinksCard as n, CatalogKindHeader as o, CatalogSearchResultListItem as p, EntityLayout as q, EntityOrphanWarning as r, isOrphan as s, EntityProcessingErrorsPanel as t, hasCatalogProcessingErrors as u, EntitySwitch as v, isKind as w, isNamespace as x, isComponentType as y, FilterContainer as z };
1455
+ //# sourceMappingURL=index-3507149b.esm.js.map