@backstage/plugin-catalog 0.10.0-next.0 → 1.0.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/dist/esm/{index-142ea58f.esm.js → index-0f8f348d.esm.js} +5 -6
- package/dist/esm/index-0f8f348d.esm.js.map +1 -0
- package/dist/esm/index-3763491b.esm.js.map +1 -1
- package/dist/esm/index-390fab14.esm.js.map +1 -1
- package/dist/esm/index-41ab53b6.esm.js.map +1 -1
- package/dist/esm/index-4e6adb42.esm.js.map +1 -1
- package/dist/esm/index-66fdb6ad.esm.js.map +1 -1
- package/dist/esm/{index-24c3e4e1.esm.js → index-74617ebb.esm.js} +30 -56
- package/dist/esm/index-74617ebb.esm.js.map +1 -0
- package/dist/esm/index-896aeac9.esm.js.map +1 -1
- package/dist/esm/index-acb3cf04.esm.js.map +1 -1
- package/dist/esm/index-b3ad464b.esm.js.map +1 -1
- package/dist/esm/index-d41abbff.esm.js.map +1 -1
- package/dist/esm/{index-19e9c476.esm.js → index-fd09677a.esm.js} +2 -3
- package/dist/esm/index-fd09677a.esm.js.map +1 -0
- package/dist/esm/presets-13b889b9.esm.js.map +1 -1
- package/dist/index.d.ts +35 -18
- package/dist/index.esm.js +1 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +18 -18
- package/dist/esm/index-142ea58f.esm.js.map +0 -1
- package/dist/esm/index-19e9c476.esm.js.map +0 -1
- package/dist/esm/index-24c3e4e1.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.0.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2a3cac4c60: Corrected replacements for depreciated FilteredEntityLayout items
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-model@1.0.1-next.0
|
|
10
|
+
- @backstage/plugin-search-common@0.3.3-next.0
|
|
11
|
+
- @backstage/plugin-catalog-react@1.0.1-next.0
|
|
12
|
+
- @backstage/core-components@0.9.3-next.0
|
|
13
|
+
- @backstage/catalog-client@1.0.1-next.0
|
|
14
|
+
- @backstage/integration-react@1.0.1-next.0
|
|
15
|
+
- @backstage/plugin-catalog-common@1.0.1-next.0
|
|
16
|
+
|
|
17
|
+
## 1.0.0
|
|
18
|
+
|
|
19
|
+
### Major Changes
|
|
20
|
+
|
|
21
|
+
- b58c70c223: This package has been promoted to v1.0! To understand how this change affects the package, please check out our [versioning policy](https://backstage.io/docs/overview/versioning-policy).
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- a422d7ce5e: chore(deps): bump `@testing-library/react` from 11.2.6 to 12.1.3
|
|
26
|
+
- c689d7a94c: **DEPRECATION**: The `FilteredEntityLayout` and related components have been moved to `@backstage/plugin-catalog-react` and renamed. The original components are now deprecated and should be replaced as follows:
|
|
27
|
+
|
|
28
|
+
- `FilteredEntityLayout` -> `CatalogFilterLayout`
|
|
29
|
+
- `FilterContainer` -> `CatalogFilterLayout.Filters`
|
|
30
|
+
- `EntityListContainer` -> `CatalogFilterLayout.Content`
|
|
31
|
+
|
|
32
|
+
- d4afa7e30d: Fix for `EntitySwitch` not properly falling back to render the default entity page when the entity is missing.
|
|
33
|
+
- f24ef7864e: Minor typo fixes
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
- @backstage/core-components@0.9.2
|
|
36
|
+
- @backstage/core-plugin-api@1.0.0
|
|
37
|
+
- @backstage/integration-react@1.0.0
|
|
38
|
+
- @backstage/plugin-catalog-react@1.0.0
|
|
39
|
+
- @backstage/catalog-model@1.0.0
|
|
40
|
+
- @backstage/catalog-client@1.0.0
|
|
41
|
+
- @backstage/errors@1.0.0
|
|
42
|
+
- @backstage/types@1.0.0
|
|
43
|
+
- @backstage/plugin-catalog-common@1.0.0
|
|
44
|
+
- @backstage/plugin-search-common@0.3.2
|
|
45
|
+
|
|
46
|
+
## 0.10.0
|
|
47
|
+
|
|
48
|
+
### Minor Changes
|
|
49
|
+
|
|
50
|
+
- 51856359bf: **BREAKING**: Removed the `AboutCard` component which has been replaced by `EntityAboutCard`.
|
|
51
|
+
- 5ea9509e6a: **BREAKING**: Removed `CatalogResultListItemProps` and `CatalogResultListItem`, replaced by `CatalogSearchResultListItemProps` and `CatalogSearchResultListItem`.
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- 9a06d18385: Added an `allowedKinds` option to `CatalogKindHeader` to limit entity kinds available in the dropdown.
|
|
56
|
+
- 251688a75e: Updated `CatalogKindHeader` to respond to external changes to query parameters in the URL, such as two sidebar links that apply different catalog filters.
|
|
57
|
+
- 9844d4d2bd: Removed usage of removed hook.
|
|
58
|
+
- 3e54f6c436: Use `@backstage/plugin-search-common` package instead of `@backstage/search-common`.
|
|
59
|
+
- Updated dependencies
|
|
60
|
+
- @backstage/plugin-catalog-react@0.9.0
|
|
61
|
+
- @backstage/core-components@0.9.1
|
|
62
|
+
- @backstage/catalog-model@0.13.0
|
|
63
|
+
- @backstage/plugin-catalog-common@0.2.2
|
|
64
|
+
- @backstage/plugin-search-common@0.3.1
|
|
65
|
+
- @backstage/catalog-client@0.9.0
|
|
66
|
+
- @backstage/integration-react@0.1.25
|
|
67
|
+
|
|
3
68
|
## 0.10.0-next.0
|
|
4
69
|
|
|
5
70
|
### Minor Changes
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { useOutlet } from 'react-router';
|
|
3
3
|
import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton } from '@backstage/core-components';
|
|
4
4
|
import { useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
5
|
-
import { EntityListProvider, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
|
|
6
|
-
import { c as createComponentRouteRef, C as CatalogKindHeader,
|
|
5
|
+
import { EntityListProvider, CatalogFilterLayout, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
|
|
6
|
+
import { c as createComponentRouteRef, C as CatalogKindHeader, a as CatalogTable } from './index-74617ebb.esm.js';
|
|
7
7
|
import 'zen-observable';
|
|
8
8
|
import '@backstage/catalog-model';
|
|
9
9
|
import 'lodash';
|
|
@@ -24,7 +24,6 @@ import '@material-ui/icons/MoreVert';
|
|
|
24
24
|
import '@backstage/plugin-catalog-common';
|
|
25
25
|
import '@backstage/errors';
|
|
26
26
|
import '@backstage/catalog-client';
|
|
27
|
-
import '@material-ui/icons/FilterList';
|
|
28
27
|
|
|
29
28
|
function DefaultCatalogPage(props) {
|
|
30
29
|
var _a;
|
|
@@ -39,9 +38,9 @@ function DefaultCatalogPage(props) {
|
|
|
39
38
|
}, /* @__PURE__ */ React.createElement(CreateButton, {
|
|
40
39
|
title: "Create Component",
|
|
41
40
|
to: createComponentLink && createComponentLink()
|
|
42
|
-
}), /* @__PURE__ */ React.createElement(SupportButton, null, "All your software catalog entities")), /* @__PURE__ */ React.createElement(
|
|
41
|
+
}), /* @__PURE__ */ React.createElement(SupportButton, null, "All your software catalog entities")), /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(EntityTypePicker, null), /* @__PURE__ */ React.createElement(UserListPicker, {
|
|
43
42
|
initialFilter: initiallySelectedFilter
|
|
44
|
-
}), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(
|
|
43
|
+
}), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(CatalogTable, {
|
|
45
44
|
columns,
|
|
46
45
|
actions
|
|
47
46
|
}))))));
|
|
@@ -55,4 +54,4 @@ function CatalogPage(props) {
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
export { CatalogPage, DefaultCatalogPage };
|
|
58
|
-
//# sourceMappingURL=index-
|
|
57
|
+
//# sourceMappingURL=index-0f8f348d.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-0f8f348d.esm.js","sources":["../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\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 EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\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}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const { columns, actions, initiallySelectedFilter = 'owned' } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <EntityListProvider>\n <Content>\n <ContentHeader titleComponent={<CatalogKindHeader />}>\n <CreateButton\n title=\"Create Component\"\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable columns={columns} actions={actions} />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </Content>\n </EntityListProvider>\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDO,SAAA,kBAAA,CAA4B,KAAgC,EAAA;AApDnE,EAAA,IAAA,EAAA,CAAA;AAqDE,EAAA,MAAM,EAAE,OAAA,EAAS,OAAS,EAAA,uBAAA,GAA0B,OAAY,EAAA,GAAA,KAAA,CAAA;AAChE,EAAA,MAAM,UACJ,CAAO,EAAA,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,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IAAe,OAAO,CAAG,EAAA,OAAA,CAAA,QAAA,CAAA;AAAA,IAAmB,OAAQ,EAAA,MAAA;AAAA,GAAA,kBAClD,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IAAc,cAAA,sCAAiB,iBAAkB,EAAA,IAAA,CAAA;AAAA,GAAA,kBAC/C,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA;AAAA,IACC,KAAM,EAAA,kBAAA;AAAA,IACN,EAAA,EAAI,uBAAuB,mBAAoB,EAAA;AAAA,GACjD,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,IAAA,EAAA,oCAAkC,CACnD,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,mBACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,oBAAoB,OAApB,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,IAAiB,mBACjB,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IAAe,aAAe,EAAA,uBAAA;AAAA,GAAyB,CACxD,kBAAA,KAAA,CAAA,aAAA,CAAC,iBAAkB,EAAA,IAAA,CAAA,sCAClB,qBAAsB,EAAA,IAAA,CAAA,kBACtB,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA,IAAgB,CACnB,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,mBAAoB,CAAA,OAAA,EAApB,sBACE,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA;AAAA,IAAa,OAAA;AAAA,IAAkB,OAAA;AAAA,GAAkB,CACpD,CACF,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;AC9DO,SAAA,WAAA,CAAqB,KAAgC,EAAA;AAC1D,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,OAAO,0BAAW,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAA,IAAuB,GAAA,KAAA;AAAA,GAAO,CAAA,CAAA;AAClD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-3763491b.esm.js","sources":["../../src/components/HasSystemsCard/HasSystemsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasSystemsCard(props: HasSystemsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has systems\"\n entityKind=\"System\"\n relationType={RELATION_HAS_PART}\n columns={systemEntityColumns}\n asRenderableEntities={asSystemEntities}\n emptyMessage=\"No system is part of this domain\"\n emptyHelpLink={systemEntityHelpLink}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index-3763491b.esm.js","sources":["../../src/components/HasSystemsCard/HasSystemsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasSystemsCard(props: HasSystemsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has systems\"\n entityKind=\"System\"\n relationType={RELATION_HAS_PART}\n columns={systemEntityColumns}\n asRenderableEntities={asSystemEntities}\n emptyMessage=\"No system is part of this domain\"\n emptyHelpLink={systemEntityHelpLink}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AA8BO,SAAA,cAAA,CAAwB,KAA4B,EAAA;AACzD,EAAM,MAAA,EAAE,UAAU,UAAe,EAAA,GAAA,KAAA,CAAA;AACjC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAM,EAAA,aAAA;AAAA,IACN,UAAW,EAAA,QAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,mBAAA;AAAA,IACT,oBAAsB,EAAA,gBAAA;AAAA,IACtB,YAAa,EAAA,kCAAA;AAAA,IACb,aAAe,EAAA,oBAAA;AAAA,GACjB,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-390fab14.esm.js","sources":["../../src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.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 { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: 'gridItem';\n title?: string;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={componentEntityColumns}\n emptyMessage=\"No component depends on this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index-390fab14.esm.js","sources":["../../src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.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 { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: 'gridItem';\n title?: string;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={componentEntityColumns}\n emptyMessage=\"No component depends on this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AA+BO,SAAA,0BAAA,CACL,KACA,EAAA;AACA,EAAA,MAAM,EAAE,OAAA,GAAU,UAAY,EAAA,KAAA,GAAQ,0BAA+B,EAAA,GAAA,KAAA,CAAA;AACrE,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAW,EAAA,WAAA;AAAA,IACX,YAAc,EAAA,sBAAA;AAAA,IACd,OAAS,EAAA,sBAAA;AAAA,IACT,YAAa,EAAA,wCAAA;AAAA,IACb,aAAe,EAAA,uBAAA;AAAA,IACf,oBAAsB,EAAA,mBAAA;AAAA,GACxB,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-41ab53b6.esm.js","sources":["../../src/components/HasSubcomponentsCard/HasSubcomponentsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has subcomponents\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n asRenderableEntities={asComponentEntities}\n emptyMessage=\"No subcomponent is part of this component\"\n emptyHelpLink=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional\"\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index-41ab53b6.esm.js","sources":["../../src/components/HasSubcomponentsCard/HasSubcomponentsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has subcomponents\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n asRenderableEntities={asComponentEntities}\n emptyMessage=\"No subcomponent is part of this component\"\n emptyHelpLink=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional\"\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AA6BO,SAAA,oBAAA,CAA8B,KAAkC,EAAA;AACrE,EAAM,MAAA,EAAE,UAAU,UAAe,EAAA,GAAA,KAAA,CAAA;AACjC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAM,EAAA,mBAAA;AAAA,IACN,UAAW,EAAA,WAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,sBAAA;AAAA,IACT,oBAAsB,EAAA,mBAAA;AAAA,IACtB,YAAa,EAAA,2CAAA;AAAA,IACb,aAAc,EAAA,mGAAA;AAAA,GAChB,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-4e6adb42.esm.js","sources":["../../src/components/CatalogEntityPage/useEntityFromUrl.ts","../../src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n errorApiRef,\n useApi,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n EntityLoadingStatus,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = (): EntityLoadingStatus => {\n const { kind, namespace, name } = useRouteRefParams(entityRouteRef);\n const navigate = useNavigate();\n const errorApi = useApi(errorApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entity,\n error,\n loading,\n retry: refresh,\n } = useAsyncRetry(\n () => catalogApi.getEntityByRef({ kind, namespace, name }),\n [catalogApi, kind, namespace, name],\n );\n\n useEffect(() => {\n if (!name) {\n errorApi.post(new Error('No name provided!'));\n navigate('/');\n }\n }, [errorApi, navigate, error, loading, entity, name]);\n\n return { entity, loading, error, refresh };\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 React from 'react';\nimport { Outlet } from 'react-router';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n <AsyncEntityProvider {...useEntityFromUrl()}>\n <Outlet />\n </AsyncEntityProvider>\n );\n}\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index-4e6adb42.esm.js","sources":["../../src/components/CatalogEntityPage/useEntityFromUrl.ts","../../src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n errorApiRef,\n useApi,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n EntityLoadingStatus,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = (): EntityLoadingStatus => {\n const { kind, namespace, name } = useRouteRefParams(entityRouteRef);\n const navigate = useNavigate();\n const errorApi = useApi(errorApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entity,\n error,\n loading,\n retry: refresh,\n } = useAsyncRetry(\n () => catalogApi.getEntityByRef({ kind, namespace, name }),\n [catalogApi, kind, namespace, name],\n );\n\n useEffect(() => {\n if (!name) {\n errorApi.post(new Error('No name provided!'));\n navigate('/');\n }\n }, [errorApi, navigate, error, loading, entity, name]);\n\n return { entity, loading, error, refresh };\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 React from 'react';\nimport { Outlet } from 'react-router';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n <AsyncEntityProvider {...useEntityFromUrl()}>\n <Outlet />\n </AsyncEntityProvider>\n );\n}\n"],"names":[],"mappings":";;;;;;AA8BO,MAAM,mBAAmB,MAA2B;AACzD,EAAA,MAAM,EAAE,IAAA,EAAM,SAAW,EAAA,IAAA,EAAA,GAAS,kBAAkB,cAAc,CAAA,CAAA;AAClE,EAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA,CAAA;AACnC,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AAEvC,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,MAAA;AAAA,IACP,KAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAO,EAAA,OAAA;AAAA,GAAA,GACL,aACF,CAAA,MAAM,UAAW,CAAA,cAAA,CAAe,EAAE,IAAM,EAAA,SAAA,EAAW,IAAK,EAAC,GACzD,CAAC,UAAA,EAAY,IAAM,EAAA,SAAA,EAAW,IAAI,CACpC,CAAA,CAAA;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,IAAM,EAAA;AACT,MAAA,QAAA,CAAS,IAAK,CAAA,IAAI,KAAM,CAAA,mBAAmB,CAAC,CAAA,CAAA;AAC5C,MAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AAAA,KACd;AAAA,GACF,EAAG,CAAC,QAAU,EAAA,QAAA,EAAU,OAAO,OAAS,EAAA,MAAA,EAAQ,IAAI,CAAC,CAAA,CAAA;AAErD,EAAA,OAAO,EAAE,MAAA,EAAQ,OAAS,EAAA,KAAA,EAAO,OAAQ,EAAA,CAAA;AAC3C,CAAA;;AChCoC,SAAA,iBAAA,GAAA;AAClC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IAAA,GAAwB,gBAAiB,EAAA;AAAA,GACxC,kBAAA,KAAA,CAAA,aAAA,CAAC,YAAO,CACV,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-66fdb6ad.esm.js","sources":["../../src/components/DependsOnComponentsCard/DependsOnComponentsCard.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 { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnComponentsCardProps {\n variant?: 'gridItem';\n title?: string;\n}\n\nexport function DependsOnComponentsCard(props: DependsOnComponentsCardProps) {\n const { variant = 'gridItem', title = 'Depends on components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDS_ON}\n columns={componentEntityColumns}\n emptyMessage=\"No component is a dependency of this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index-66fdb6ad.esm.js","sources":["../../src/components/DependsOnComponentsCard/DependsOnComponentsCard.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 { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnComponentsCardProps {\n variant?: 'gridItem';\n title?: string;\n}\n\nexport function DependsOnComponentsCard(props: DependsOnComponentsCardProps) {\n const { variant = 'gridItem', title = 'Depends on components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDS_ON}\n columns={componentEntityColumns}\n emptyMessage=\"No component is a dependency of this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AA+BO,SAAA,uBAAA,CAAiC,KAAqC,EAAA;AAC3E,EAAA,MAAM,EAAE,OAAA,GAAU,UAAY,EAAA,KAAA,GAAQ,uBAA4B,EAAA,GAAA,KAAA,CAAA;AAClE,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAW,EAAA,WAAA;AAAA,IACX,YAAc,EAAA,mBAAA;AAAA,IACd,OAAS,EAAA,sBAAA;AAAA,IACT,YAAa,EAAA,gDAAA;AAAA,IACb,aAAe,EAAA,uBAAA;AAAA,IACf,oBAAsB,EAAA,mBAAA;AAAA,GACxB,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -4,8 +4,8 @@ import { isArray, isString, capitalize as capitalize$1 } 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, useRouteRef, 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
|
-
import { getEntityRelations, EntityRefLinks, useEntity, catalogApiRef, getEntitySourceLocation, useEntityList, EntityKindFilter, humanizeEntityRef, EntityRefLink, useStarredEntities, useEntityPermission, entityRouteRef, useAsyncEntity, UnregisterEntityDialog, InspectEntityDialog, FavoriteEntity, starredEntitiesApiRef } from '@backstage/plugin-catalog-react';
|
|
8
|
-
import { makeStyles, Typography, Grid, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, capitalize, Select, InputBase, MenuItem, ListItem, ListItemText, Box, ListItemIcon, Popover, MenuList, Dialog, DialogTitle, DialogActions, Button
|
|
7
|
+
import { getEntityRelations, EntityRefLinks, useEntity, catalogApiRef, getEntitySourceLocation, useEntityList, EntityKindFilter, humanizeEntityRef, EntityRefLink, useStarredEntities, useEntityPermission, entityRouteRef, useAsyncEntity, UnregisterEntityDialog, InspectEntityDialog, FavoriteEntity, CatalogFilterLayout, starredEntitiesApiRef } from '@backstage/plugin-catalog-react';
|
|
8
|
+
import { makeStyles, Typography, Grid, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, capitalize, Select, InputBase, MenuItem, ListItem, ListItemText, Box, ListItemIcon, 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';
|
|
@@ -23,7 +23,6 @@ import MoreVert from '@material-ui/icons/MoreVert';
|
|
|
23
23
|
import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common';
|
|
24
24
|
import { assertError } from '@backstage/errors';
|
|
25
25
|
import { ENTITY_STATUS_CATALOG_PROCESSING_TYPE, CatalogClient } from '@backstage/catalog-client';
|
|
26
|
-
import FilterListIcon from '@material-ui/icons/FilterList';
|
|
27
26
|
|
|
28
27
|
async function performMigrationToTheNewBucket({
|
|
29
28
|
storageApi
|
|
@@ -307,20 +306,24 @@ const useStyles$2 = makeStyles((theme) => createStyles({
|
|
|
307
306
|
}
|
|
308
307
|
}));
|
|
309
308
|
function CatalogKindHeader(props) {
|
|
310
|
-
|
|
309
|
+
var _a;
|
|
310
|
+
const { initialFilter = "component", allowedKinds } = props;
|
|
311
311
|
const classes = useStyles$2();
|
|
312
312
|
const catalogApi = useApi(catalogApiRef);
|
|
313
313
|
const { value: allKinds } = useAsync(async () => {
|
|
314
314
|
return await catalogApi.getEntityFacets({ facets: ["kind"] }).then((response) => {
|
|
315
|
-
var
|
|
316
|
-
return ((
|
|
315
|
+
var _a2;
|
|
316
|
+
return ((_a2 = response.facets.kind) == null ? void 0 : _a2.map((f) => f.value).sort()) || [];
|
|
317
317
|
});
|
|
318
318
|
});
|
|
319
319
|
const {
|
|
320
320
|
updateFilters,
|
|
321
321
|
queryParameters: { kind: kindParameter }
|
|
322
322
|
} = useEntityList();
|
|
323
|
-
const queryParamKind = useMemo(() =>
|
|
323
|
+
const queryParamKind = useMemo(() => {
|
|
324
|
+
var _a2;
|
|
325
|
+
return (_a2 = [kindParameter].flat()[0]) == null ? void 0 : _a2.toLocaleLowerCase("en-US");
|
|
326
|
+
}, [kindParameter]);
|
|
324
327
|
const [selectedKind, setSelectedKind] = useState(queryParamKind != null ? queryParamKind : initialFilter);
|
|
325
328
|
useEffect(() => {
|
|
326
329
|
updateFilters({
|
|
@@ -332,7 +335,8 @@ function CatalogKindHeader(props) {
|
|
|
332
335
|
setSelectedKind(queryParamKind);
|
|
333
336
|
}
|
|
334
337
|
}, [queryParamKind]);
|
|
335
|
-
const
|
|
338
|
+
const availableKinds = [capitalize(selectedKind)].concat((_a = allKinds == null ? void 0 : allKinds.filter((k) => allowedKinds ? allowedKinds.some((a) => a.toLocaleLowerCase("en-US") === k.toLocaleLowerCase("en-US")) : true)) != null ? _a : []);
|
|
339
|
+
const options = availableKinds.sort().reduce((acc, kind) => {
|
|
336
340
|
acc[kind.toLocaleLowerCase("en-US")] = kind;
|
|
337
341
|
return acc;
|
|
338
342
|
}, {});
|
|
@@ -909,24 +913,32 @@ const EntitySwitchCaseComponent = (_props) => null;
|
|
|
909
913
|
attachComponentData(EntitySwitchCaseComponent, ENTITY_SWITCH_KEY, true);
|
|
910
914
|
const EntitySwitch = (props) => {
|
|
911
915
|
var _a, _b;
|
|
912
|
-
const { entity } = useAsyncEntity();
|
|
916
|
+
const { entity, loading } = useAsyncEntity();
|
|
913
917
|
const apis = useApiHolder();
|
|
914
918
|
const results = useElementFilter(props.children, (collection) => collection.selectByComponentData({
|
|
915
919
|
key: ENTITY_SWITCH_KEY,
|
|
916
920
|
withStrictError: "Child of EntitySwitch is not an EntitySwitch.Case"
|
|
917
921
|
}).getElements().flatMap((element) => {
|
|
918
922
|
var _a2;
|
|
919
|
-
if (
|
|
923
|
+
if (loading) {
|
|
920
924
|
return [];
|
|
921
925
|
}
|
|
922
926
|
const { if: condition, children: elementsChildren } = element.props;
|
|
927
|
+
if (!entity) {
|
|
928
|
+
return [
|
|
929
|
+
{
|
|
930
|
+
if: condition === void 0,
|
|
931
|
+
children: elementsChildren
|
|
932
|
+
}
|
|
933
|
+
];
|
|
934
|
+
}
|
|
923
935
|
return [
|
|
924
936
|
{
|
|
925
937
|
if: (_a2 = condition == null ? void 0 : condition(entity, { apis })) != null ? _a2 : true,
|
|
926
938
|
children: elementsChildren
|
|
927
939
|
}
|
|
928
940
|
];
|
|
929
|
-
}), [apis, entity]);
|
|
941
|
+
}), [apis, entity, loading]);
|
|
930
942
|
const hasAsyncCases = results.some((r) => typeof r.if === "object" && "then" in r.if);
|
|
931
943
|
if (hasAsyncCases) {
|
|
932
944
|
return /* @__PURE__ */ React.createElement(AsyncEntitySwitch, {
|
|
@@ -978,47 +990,9 @@ function isNamespace(namespace) {
|
|
|
978
990
|
};
|
|
979
991
|
}
|
|
980
992
|
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
style: { position: "relative" }
|
|
985
|
-
}, props.children);
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
function FilterContainer(props) {
|
|
989
|
-
const isMidSizeScreen = useMediaQuery((theme2) => theme2.breakpoints.down("md"));
|
|
990
|
-
const theme = useTheme();
|
|
991
|
-
const [filterDrawerOpen, setFilterDrawerOpen] = useState(false);
|
|
992
|
-
return isMidSizeScreen ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, {
|
|
993
|
-
style: { marginTop: theme.spacing(1), marginLeft: theme.spacing(1) },
|
|
994
|
-
onClick: () => setFilterDrawerOpen(true),
|
|
995
|
-
startIcon: /* @__PURE__ */ React.createElement(FilterListIcon, null)
|
|
996
|
-
}, "Filters"), /* @__PURE__ */ React.createElement(Drawer, {
|
|
997
|
-
open: filterDrawerOpen,
|
|
998
|
-
onClose: () => setFilterDrawerOpen(false),
|
|
999
|
-
anchor: "left",
|
|
1000
|
-
disableAutoFocus: true,
|
|
1001
|
-
keepMounted: true,
|
|
1002
|
-
variant: "temporary"
|
|
1003
|
-
}, /* @__PURE__ */ React.createElement(Box, {
|
|
1004
|
-
m: 2
|
|
1005
|
-
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
1006
|
-
variant: "h6",
|
|
1007
|
-
component: "h2",
|
|
1008
|
-
style: { marginBottom: theme.spacing(1) }
|
|
1009
|
-
}, "Filters"), props.children))) : /* @__PURE__ */ React.createElement(Grid, {
|
|
1010
|
-
item: true,
|
|
1011
|
-
lg: 2
|
|
1012
|
-
}, props.children);
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
function EntityListContainer(props) {
|
|
1016
|
-
return /* @__PURE__ */ React.createElement(Grid, {
|
|
1017
|
-
item: true,
|
|
1018
|
-
xs: 12,
|
|
1019
|
-
lg: 10
|
|
1020
|
-
}, props.children);
|
|
1021
|
-
}
|
|
993
|
+
const FilteredEntityLayout = CatalogFilterLayout;
|
|
994
|
+
const FilterContainer = CatalogFilterLayout.Filters;
|
|
995
|
+
const EntityListContainer = CatalogFilterLayout.Content;
|
|
1022
996
|
|
|
1023
997
|
const catalogPlugin = createPlugin({
|
|
1024
998
|
id: "catalog",
|
|
@@ -1048,7 +1022,7 @@ const catalogPlugin = createPlugin({
|
|
|
1048
1022
|
});
|
|
1049
1023
|
const CatalogIndexPage = catalogPlugin.provide(createRoutableExtension({
|
|
1050
1024
|
name: "CatalogIndexPage",
|
|
1051
|
-
component: () => import('./index-
|
|
1025
|
+
component: () => import('./index-0f8f348d.esm.js').then((m) => m.CatalogPage),
|
|
1052
1026
|
mountPoint: rootRouteRef
|
|
1053
1027
|
}));
|
|
1054
1028
|
const CatalogEntityPage = catalogPlugin.provide(createRoutableExtension({
|
|
@@ -1059,7 +1033,7 @@ const CatalogEntityPage = catalogPlugin.provide(createRoutableExtension({
|
|
|
1059
1033
|
const EntityAboutCard = catalogPlugin.provide(createComponentExtension({
|
|
1060
1034
|
name: "EntityAboutCard",
|
|
1061
1035
|
component: {
|
|
1062
|
-
lazy: () => import('./index-
|
|
1036
|
+
lazy: () => import('./index-fd09677a.esm.js').then((m) => m.AboutCard)
|
|
1063
1037
|
}
|
|
1064
1038
|
}));
|
|
1065
1039
|
const EntityLinksCard = catalogPlugin.provide(createComponentExtension({
|
|
@@ -1117,5 +1091,5 @@ const RelatedEntitiesCard = catalogPlugin.provide(createComponentExtension({
|
|
|
1117
1091
|
}
|
|
1118
1092
|
}));
|
|
1119
1093
|
|
|
1120
|
-
export { AboutCard as A,
|
|
1121
|
-
//# sourceMappingURL=index-
|
|
1094
|
+
export { AboutCard as A, EntityListContainer as B, CatalogKindHeader as C, DefaultStarredEntitiesApi as D, EntityAboutCard as E, FilteredEntityLayout as F, 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 };
|
|
1095
|
+
//# sourceMappingURL=index-74617ebb.esm.js.map
|