@backstage/plugin-catalog 0.10.0 → 1.1.0-next.1

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,62 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.1.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - bdc61b4002: Expose 'initalFilter' through initialKind prop on Catalog Page.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @backstage/plugin-catalog-react@1.0.1-next.1
13
+ - @backstage/plugin-catalog-common@1.0.1-next.1
14
+ - @backstage/integration-react@1.0.1-next.1
15
+ - @backstage/plugin-search-common@0.3.3-next.1
16
+
17
+ ## 1.0.1-next.0
18
+
19
+ ### Patch Changes
20
+
21
+ - 2a3cac4c60: Corrected replacements for depreciated FilteredEntityLayout items
22
+ - Updated dependencies
23
+ - @backstage/catalog-model@1.0.1-next.0
24
+ - @backstage/plugin-search-common@0.3.3-next.0
25
+ - @backstage/plugin-catalog-react@1.0.1-next.0
26
+ - @backstage/core-components@0.9.3-next.0
27
+ - @backstage/catalog-client@1.0.1-next.0
28
+ - @backstage/integration-react@1.0.1-next.0
29
+ - @backstage/plugin-catalog-common@1.0.1-next.0
30
+
31
+ ## 1.0.0
32
+
33
+ ### Major Changes
34
+
35
+ - 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).
36
+
37
+ ### Patch Changes
38
+
39
+ - a422d7ce5e: chore(deps): bump `@testing-library/react` from 11.2.6 to 12.1.3
40
+ - 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:
41
+
42
+ - `FilteredEntityLayout` -> `CatalogFilterLayout`
43
+ - `FilterContainer` -> `CatalogFilterLayout.Filters`
44
+ - `EntityListContainer` -> `CatalogFilterLayout.Content`
45
+
46
+ - d4afa7e30d: Fix for `EntitySwitch` not properly falling back to render the default entity page when the entity is missing.
47
+ - f24ef7864e: Minor typo fixes
48
+ - Updated dependencies
49
+ - @backstage/core-components@0.9.2
50
+ - @backstage/core-plugin-api@1.0.0
51
+ - @backstage/integration-react@1.0.0
52
+ - @backstage/plugin-catalog-react@1.0.0
53
+ - @backstage/catalog-model@1.0.0
54
+ - @backstage/catalog-client@1.0.0
55
+ - @backstage/errors@1.0.0
56
+ - @backstage/types@1.0.0
57
+ - @backstage/plugin-catalog-common@1.0.0
58
+ - @backstage/plugin-search-common@0.3.2
59
+
3
60
  ## 0.10.0
4
61
 
5
62
  ### Minor Changes
@@ -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":";;;;;;;wBA8B+B,OAA4B;AACzD,QAAM,EAAE,UAAU,eAAe;AACjC,6CACG,qBAAD;AAAA,IACE;AAAA,IACA,OAAM;AAAA,IACN,YAAW;AAAA,IACX,cAAc;AAAA,IACd,SAAS;AAAA,IACT,sBAAsB;AAAA,IACtB,cAAa;AAAA,IACb,eAAe;AAAA;AAAA;;;;"}
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":";;;;;;;oCAgCE,OACA;AACA,QAAM,EAAE,UAAU,YAAY,QAAQ,+BAA+B;AACrE,6CACG,qBAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA,YAAW;AAAA,IACX,cAAc;AAAA,IACd,SAAS;AAAA,IACT,cAAa;AAAA,IACb,eAAe;AAAA,IACf,sBAAsB;AAAA;AAAA;;;;"}
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,4 +1,4 @@
1
- export { A as AboutCard, d as AboutContent, e as AboutField } from './index-d0ca7cce.esm.js';
1
+ export { A as AboutCard, b as AboutContent, d as AboutField } from './index-b60aacb6.esm.js';
2
2
  import 'zen-observable';
3
3
  import '@backstage/catalog-model';
4
4
  import 'lodash';
@@ -24,5 +24,4 @@ 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
- //# sourceMappingURL=index-b5c7aaa3.esm.js.map
27
+ //# sourceMappingURL=index-40cbb970.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-40cbb970.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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":";;;;;;;8BA6BqC,OAAkC;AACrE,QAAM,EAAE,UAAU,eAAe;AACjC,6CACG,qBAAD;AAAA,IACE;AAAA,IACA,OAAM;AAAA,IACN,YAAW;AAAA,IACX,cAAc;AAAA,IACd,SAAS;AAAA,IACT,sBAAsB;AAAA,IACtB,cAAa;AAAA,IACb,eAAc;AAAA;AAAA;;;;"}
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":";;;;;;MA8Ba,mBAAmB,MAA2B;AACzD,QAAM,EAAE,MAAM,WAAW,SAAS,kBAAkB;AACpD,QAAM,WAAW;AACjB,QAAM,WAAW,OAAO;AACxB,QAAM,aAAa,OAAO;AAE1B,QAAM;AAAA,IACJ,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,OAAO;AAAA,MACL,cACF,MAAM,WAAW,eAAe,EAAE,MAAM,WAAW,SACnD,CAAC,YAAY,MAAM,WAAW;AAGhC,YAAU,MAAM;AACd,QAAI,CAAC,MAAM;AACT,eAAS,KAAK,IAAI,MAAM;AACxB,eAAS;AAAA;AAAA,KAEV,CAAC,UAAU,UAAU,OAAO,SAAS,QAAQ;AAEhD,SAAO,EAAE,QAAQ,SAAS,OAAO;AAAA;;6BC/BC;AAClC,6CACG,qBAAD;AAAA,OAAyB;AAAA,yCACtB,QAAD;AAAA;;;;"}
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":";;;;;;;iCA+BwC,OAAqC;AAC3E,QAAM,EAAE,UAAU,YAAY,QAAQ,4BAA4B;AAClE,6CACG,qBAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA,YAAW;AAAA,IACX,cAAc;AAAA,IACd,SAAS;AAAA,IACT,cAAa;AAAA,IACb,eAAe;AAAA,IACf,sBAAsB;AAAA;AAAA;;;;"}
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;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-896aeac9.esm.js","sources":["../../src/components/EntityLinksCard/EntityLinksEmptyState.tsx","../../src/components/EntityLinksCard/IconLink.tsx","../../src/components/EntityLinksCard/useDynamicColumns.tsx","../../src/components/EntityLinksCard/LinksGridList.tsx","../../src/components/EntityLinksCard/EntityLinksCard.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 { BackstageTheme } from '@backstage/theme';\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n <>\n <Typography variant=\"body1\">\n No links defined for this entity. You can add links to your entity YAML\n as shown in the highlighted example below:\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n Read more\n </Button>\n </>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Theme, useMediaQuery } from '@material-ui/core';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\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 { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: 'gridItem';\n}\n\nexport function EntityLinksCard(props: EntityLinksCardProps) {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title=\"Links\" variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n}\n"],"names":["useStyles"],"mappings":";;;;;;;AAqBA,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpB,MAAMA,cAAY,WAChB;AAAU,EACR,MAAM;AAAA,IACJ,cAAc;AAAA,IACd,QAAQ,GAAG,MAAM,QAAQ;AAAA,IACzB,YAAY,MAAM,QAAQ,SAAS,SAAS,SAAS;AAAA;AAAA,IAGzD,EAAE,MAAM;iCAG8B;AACtC,QAAM,UAAUA;AAEhB,uGAEK,YAAD;AAAA,IAAY,SAAQ;AAAA,KAAQ,2JAI3B,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,aAAD;AAAA,IACE,MAAM;AAAA,IACN,UAAS;AAAA,IACT,iBAAe;AAAA,IACf,oBAAoB,CAAC,GAAG,GAAG,GAAG;AAAA,IAC9B,aAAa,EAAE,YAAY,WAAW,UAAU;AAAA,2CAGnD,QAAD;AAAA,IACE,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;AAAA,KACN;AAAA;;AC3CP,MAAM,YAAY,WAAW;AAAA,EAC3B,SAAS;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,MACV,eAAe;AAAA;AAAA;AAAA;kBAKI,OAItB;AACD,QAAM,EAAE,MAAM,MAAM,SAAS;AAC7B,QAAM,UAAU;AAEhB,6CACG,KAAD;AAAA,IAAK,SAAQ;AAAA,yCACV,KAAD;AAAA,IAAK,IAAI;AAAA,IAAG,WAAW,QAAQ;AAAA,yCAC5B,YAAD;AAAA,IAAY,WAAU;AAAA,KACnB,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M,MAAM;AAEZ,QAAM,eAAe,CAAC,QAA6B;AApCrD;AAqCI,iBAAM,WAAI,cAAc,SAAlB,aAA0B,eAAe;AAAA;AAEjD,QAAM,QAAQ,uCAAQ,aAAR,mBAAkB;AAEhC,6CACG,UAAD;AAAA,IAAU,OAAM;AAAA,IAAQ;AAAA,KACrB,CAAC,SAAS,MAAM,WAAW,wCACzB,uBAAD,4CAEC,eAAD;AAAA,IACE;AAAA,IACA,OAAO,MAAM,IAAI,CAAC,EAAE,KAAK,OAAO;AAAY,MAC1C,MAAM,wBAAS;AAAA,MACf,MAAM;AAAA,MACN,MAAM,aAAa;AAAA;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index-896aeac9.esm.js","sources":["../../src/components/EntityLinksCard/EntityLinksEmptyState.tsx","../../src/components/EntityLinksCard/IconLink.tsx","../../src/components/EntityLinksCard/useDynamicColumns.tsx","../../src/components/EntityLinksCard/LinksGridList.tsx","../../src/components/EntityLinksCard/EntityLinksCard.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 { BackstageTheme } from '@backstage/theme';\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n <>\n <Typography variant=\"body1\">\n No links defined for this entity. You can add links to your entity YAML\n as shown in the highlighted example below:\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n Read more\n </Button>\n </>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Theme, useMediaQuery } from '@material-ui/core';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\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 { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: 'gridItem';\n}\n\nexport function EntityLinksCard(props: EntityLinksCardProps) {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title=\"Links\" variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n}\n"],"names":["useStyles"],"mappings":";;;;;;;AAqBA,MAAM,WAAc,GAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAA,CAAA,CAAA;AAUpB,MAAMA,WAAA,GAAY,WAChB,CAAU,KAAA,MAAA;AAAA,EACR,IAAM,EAAA;AAAA,IACJ,YAAc,EAAA,CAAA;AAAA,IACd,MAAQ,EAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA,CAAA,MAAA,CAAA;AAAA,IAC1B,UAAY,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA,MAAA;AAAA,GACvD;AACF,CACA,CAAA,EAAA,EAAE,IAAM,EAAA,oCAAA,EACV,CAAA,CAAA;AAEwC,SAAA,qBAAA,GAAA;AACtC,EAAA,MAAM,UAAUA,WAAU,EAAA,CAAA;AAE1B,EAAA,iFAEK,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IAAW,OAAQ,EAAA,OAAA;AAAA,GAAQ,EAAA,oHAG5B,mBACC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IAAI,WAAW,OAAQ,CAAA,IAAA;AAAA,GAAA,kBACrB,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,IACC,IAAM,EAAA,WAAA;AAAA,IACN,QAAS,EAAA,MAAA;AAAA,IACT,eAAe,EAAA,IAAA;AAAA,IACf,kBAAoB,EAAA,CAAC,CAAG,EAAA,CAAA,EAAG,GAAG,CAAC,CAAA;AAAA,IAC/B,WAAa,EAAA,EAAE,UAAY,E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A,GAAA,CAAA;AAqCI,IAAA,OAAA,GAAA,GAAM,CAAI,GAAA,GAAA,GAAA,CAAA,aAAA,CAAc,GAAG,CAAA,KAArB,aAA0B,YAAe,GAAA,YAAA,CAAA;AAAA,GAAA,CAAA;AAEjD,EAAM,MAAA,KAAA,GAAQ,CAAQ,EAAA,GAAA,MAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,CAAA,QAAA,KAAR,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAEhC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,IAAS,KAAM,EAAA,OAAA;AAAA,IAAQ,OAAA;AAAA,GACrB,EAAA,CAAC,SAAS,KAAM,CAAA,MAAA,KAAW,oBACzB,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,oBAEtB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IACC,IAAA;AAAA,IACA,OAAO,KAAM,CAAA,GAAA,CAAI,CAAC,EAAE,GAAA,EAAK,OAAO,IAAY,EAAA,MAAA;AAAA,MAC1C,MAAM,KAAS,IAAA,IAAA,GAAA,KAAA,GAAA,GAAA;AAAA,MACf,IAAM,EAAA,GAAA;AAAA,MACN,IAAA,EAAM,aAAa,IAAI,CAAA;AAAA,KACvB,CAAA,CAAA;AAAA,GACJ,CAEJ,CAAA,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-acb3cf04.esm.js","sources":["../../src/components/HasComponentsCard/HasComponentsCard.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 componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasComponentsCard(props: HasComponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has components\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n emptyMessage=\"No component is part of this system\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;2BA8BkC,OAA+B;AAC/D,QAAM,EAAE,UAAU,eAAe;AACjC,6CACG,qBAAD;AAAA,IACE;AAAA,IACA,OAAM;AAAA,IACN,YAAW;AAAA,IACX,cAAc;AAAA,IACd,SAAS;AAAA,IACT,cAAa;AAAA,IACb,eAAe;AAAA,IACf,sBAAsB;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index-acb3cf04.esm.js","sources":["../../src/components/HasComponentsCard/HasComponentsCard.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 componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasComponentsCard(props: HasComponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has components\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n emptyMessage=\"No component is part of this system\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AA8BO,SAAA,iBAAA,CAA2B,KAA+B,EAAA;AAC/D,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,gBAAA;AAAA,IACN,UAAW,EAAA,WAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,sBAAA;AAAA,IACT,YAAa,EAAA,qCAAA;AAAA,IACb,aAAe,EAAA,uBAAA;AAAA,IACf,oBAAsB,EAAA,mBAAA;AAAA,GACxB,CAAA,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-b3ad464b.esm.js","sources":["../../src/components/HasResourcesCard/HasResourcesCard.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 asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasResourcesCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasResourcesCard(props: HasResourcesCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has resources\"\n entityKind=\"Resource\"\n relationType={RELATION_HAS_PART}\n columns={resourceEntityColumns}\n asRenderableEntities={asResourceEntities}\n emptyMessage=\"No resource is part of this system\"\n emptyHelpLink={resourceEntityHelpLink}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;0BA8BiC,OAA8B;AAC7D,QAAM,EAAE,UAAU,eAAe;AACjC,6CACG,qBAAD;AAAA,IACE;AAAA,IACA,OAAM;AAAA,IACN,YAAW;AAAA,IACX,cAAc;AAAA,IACd,SAAS;AAAA,IACT,sBAAsB;AAAA,IACtB,cAAa;AAAA,IACb,eAAe;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index-b3ad464b.esm.js","sources":["../../src/components/HasResourcesCard/HasResourcesCard.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 asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasResourcesCardProps {\n variant?: 'gridItem';\n}\n\nexport function HasResourcesCard(props: HasResourcesCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has resources\"\n entityKind=\"Resource\"\n relationType={RELATION_HAS_PART}\n columns={resourceEntityColumns}\n asRenderableEntities={asResourceEntities}\n emptyMessage=\"No resource is part of this system\"\n emptyHelpLink={resourceEntityHelpLink}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AA8BO,SAAA,gBAAA,CAA0B,KAA8B,EAAA;AAC7D,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,eAAA;AAAA,IACN,UAAW,EAAA,UAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,qBAAA;AAAA,IACT,oBAAsB,EAAA,kBAAA;AAAA,IACtB,YAAa,EAAA,oCAAA;AAAA,IACb,aAAe,EAAA,sBAAA;AAAA,GACjB,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, useMediaQuery, useTheme, Drawer } from '@material-ui/core';
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
@@ -914,24 +913,32 @@ const EntitySwitchCaseComponent = (_props) => null;
914
913
  attachComponentData(EntitySwitchCaseComponent, ENTITY_SWITCH_KEY, true);
915
914
  const EntitySwitch = (props) => {
916
915
  var _a, _b;
917
- const { entity } = useAsyncEntity();
916
+ const { entity, loading } = useAsyncEntity();
918
917
  const apis = useApiHolder();
919
918
  const results = useElementFilter(props.children, (collection) => collection.selectByComponentData({
920
919
  key: ENTITY_SWITCH_KEY,
921
920
  withStrictError: "Child of EntitySwitch is not an EntitySwitch.Case"
922
921
  }).getElements().flatMap((element) => {
923
922
  var _a2;
924
- if (!entity) {
923
+ if (loading) {
925
924
  return [];
926
925
  }
927
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
+ }
928
935
  return [
929
936
  {
930
937
  if: (_a2 = condition == null ? void 0 : condition(entity, { apis })) != null ? _a2 : true,
931
938
  children: elementsChildren
932
939
  }
933
940
  ];
934
- }), [apis, entity]);
941
+ }), [apis, entity, loading]);
935
942
  const hasAsyncCases = results.some((r) => typeof r.if === "object" && "then" in r.if);
936
943
  if (hasAsyncCases) {
937
944
  return /* @__PURE__ */ React.createElement(AsyncEntitySwitch, {
@@ -983,47 +990,9 @@ function isNamespace(namespace) {
983
990
  };
984
991
  }
985
992
 
986
- function FilteredEntityLayout(props) {
987
- return /* @__PURE__ */ React.createElement(Grid, {
988
- container: true,
989
- style: { position: "relative" }
990
- }, props.children);
991
- }
992
-
993
- function FilterContainer(props) {
994
- const isMidSizeScreen = useMediaQuery((theme2) => theme2.breakpoints.down("md"));
995
- const theme = useTheme();
996
- const [filterDrawerOpen, setFilterDrawerOpen] = useState(false);
997
- return isMidSizeScreen ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, {
998
- style: { marginTop: theme.spacing(1), marginLeft: theme.spacing(1) },
999
- onClick: () => setFilterDrawerOpen(true),
1000
- startIcon: /* @__PURE__ */ React.createElement(FilterListIcon, null)
1001
- }, "Filters"), /* @__PURE__ */ React.createElement(Drawer, {
1002
- open: filterDrawerOpen,
1003
- onClose: () => setFilterDrawerOpen(false),
1004
- anchor: "left",
1005
- disableAutoFocus: true,
1006
- keepMounted: true,
1007
- variant: "temporary"
1008
- }, /* @__PURE__ */ React.createElement(Box, {
1009
- m: 2
1010
- }, /* @__PURE__ */ React.createElement(Typography, {
1011
- variant: "h6",
1012
- component: "h2",
1013
- style: { marginBottom: theme.spacing(1) }
1014
- }, "Filters"), props.children))) : /* @__PURE__ */ React.createElement(Grid, {
1015
- item: true,
1016
- lg: 2
1017
- }, props.children);
1018
- }
1019
-
1020
- function EntityListContainer(props) {
1021
- return /* @__PURE__ */ React.createElement(Grid, {
1022
- item: true,
1023
- xs: 12,
1024
- lg: 10
1025
- }, props.children);
1026
- }
993
+ const FilteredEntityLayout = CatalogFilterLayout;
994
+ const FilterContainer = CatalogFilterLayout.Filters;
995
+ const EntityListContainer = CatalogFilterLayout.Content;
1027
996
 
1028
997
  const catalogPlugin = createPlugin({
1029
998
  id: "catalog",
@@ -1053,7 +1022,7 @@ const catalogPlugin = createPlugin({
1053
1022
  });
1054
1023
  const CatalogIndexPage = catalogPlugin.provide(createRoutableExtension({
1055
1024
  name: "CatalogIndexPage",
1056
- component: () => import('./index-091e7b37.esm.js').then((m) => m.CatalogPage),
1025
+ component: () => import('./index-cb759769.esm.js').then((m) => m.CatalogPage),
1057
1026
  mountPoint: rootRouteRef
1058
1027
  }));
1059
1028
  const CatalogEntityPage = catalogPlugin.provide(createRoutableExtension({
@@ -1064,7 +1033,7 @@ const CatalogEntityPage = catalogPlugin.provide(createRoutableExtension({
1064
1033
  const EntityAboutCard = catalogPlugin.provide(createComponentExtension({
1065
1034
  name: "EntityAboutCard",
1066
1035
  component: {
1067
- lazy: () => import('./index-b5c7aaa3.esm.js').then((m) => m.AboutCard)
1036
+ lazy: () => import('./index-40cbb970.esm.js').then((m) => m.AboutCard)
1068
1037
  }
1069
1038
  }));
1070
1039
  const EntityLinksCard = catalogPlugin.provide(createComponentExtension({
@@ -1122,5 +1091,5 @@ const RelatedEntitiesCard = catalogPlugin.provide(createComponentExtension({
1122
1091
  }
1123
1092
  }));
1124
1093
 
1125
- export { AboutCard as A, isComponentType as B, CatalogKindHeader as C, DefaultStarredEntitiesApi as D, EntityListContainer as E, FilteredEntityLayout as F, RelatedEntitiesCard as R, FilterContainer as a, CatalogTable as b, createComponentRouteRef as c, AboutContent as d, AboutField as e, CatalogEntityPage as f, CatalogIndexPage as g, catalogPlugin as h, EntityAboutCard as i, EntityDependencyOfComponentsCard as j, EntityDependsOnComponentsCard as k, EntityDependsOnResourcesCard as l, EntityHasComponentsCard as m, EntityHasResourcesCard as n, EntityHasSubcomponentsCard as o, EntityHasSystemsCard as p, EntityLinksCard as q, CatalogSearchResultListItem as r, EntityLayout as s, EntityOrphanWarning as t, isOrphan as u, EntityProcessingErrorsPanel as v, hasCatalogProcessingErrors as w, EntitySwitch as x, isKind as y, isNamespace as z };
1126
- //# sourceMappingURL=index-d0ca7cce.esm.js.map
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-b60aacb6.esm.js.map