@backstage/plugin-catalog 1.22.0-next.2 → 1.22.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.d.ts +2 -2
- package/dist/components/DependencyOfComponentsCard/DependencyOfComponentsCard.esm.js +6 -3
- package/dist/components/DependencyOfComponentsCard/DependencyOfComponentsCard.esm.js.map +1 -1
- package/dist/components/HasComponentsCard/HasComponentsCard.esm.js +9 -3
- package/dist/components/HasComponentsCard/HasComponentsCard.esm.js.map +1 -1
- package/dist/components/HasResourcesCard/HasResourcesCard.esm.js +9 -3
- package/dist/components/HasResourcesCard/HasResourcesCard.esm.js.map +1 -1
- package/dist/components/HasSubcomponentsCard/HasSubcomponentsCard.esm.js +4 -3
- package/dist/components/HasSubcomponentsCard/HasSubcomponentsCard.esm.js.map +1 -1
- package/dist/components/HasSystemsCard/HasSystemsCard.esm.js +9 -3
- package/dist/components/HasSystemsCard/HasSystemsCard.esm.js.map +1 -1
- package/dist/index.d.ts +11 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.22.0-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6582799: Add `tableOptions` to all tables and additionally `title` to API tables.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/frontend-plugin-api@0.7.0-next.3
|
|
10
|
+
- @backstage/catalog-model@1.6.0-next.0
|
|
11
|
+
- @backstage/core-compat-api@0.2.8-next.3
|
|
12
|
+
- @backstage/plugin-catalog-react@1.12.3-next.3
|
|
13
|
+
- @backstage/plugin-search-react@1.7.14-next.3
|
|
14
|
+
- @backstage/catalog-client@1.6.6-next.0
|
|
15
|
+
- @backstage/core-components@0.14.10-next.0
|
|
16
|
+
- @backstage/core-plugin-api@1.9.3
|
|
17
|
+
- @backstage/errors@1.2.4
|
|
18
|
+
- @backstage/integration-react@1.1.30-next.0
|
|
19
|
+
- @backstage/types@1.1.1
|
|
20
|
+
- @backstage/plugin-catalog-common@1.0.26-next.2
|
|
21
|
+
- @backstage/plugin-permission-react@0.4.25-next.1
|
|
22
|
+
- @backstage/plugin-scaffolder-common@1.5.5-next.2
|
|
23
|
+
- @backstage/plugin-search-common@1.2.14-next.1
|
|
24
|
+
|
|
3
25
|
## 1.22.0-next.2
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare const _default: _backstage_frontend_plugin_api.BackstagePlugin<{
|
|
|
23
23
|
templateName: string;
|
|
24
24
|
}>;
|
|
25
25
|
unregisterRedirect: _backstage_frontend_plugin_api.ExternalRouteRef<undefined>;
|
|
26
|
-
}>;
|
|
26
|
+
}, {}>;
|
|
27
27
|
|
|
28
28
|
/** @alpha */
|
|
29
29
|
declare function createCatalogFilterExtension<TInputs extends AnyExtensionInputMap, TConfig>(options: {
|
|
@@ -34,7 +34,7 @@ declare function createCatalogFilterExtension<TInputs extends AnyExtensionInputM
|
|
|
34
34
|
loader: (options: {
|
|
35
35
|
config: TConfig;
|
|
36
36
|
}) => Promise<JSX.Element>;
|
|
37
|
-
}): _backstage_frontend_plugin_api.ExtensionDefinition<TConfig
|
|
37
|
+
}): _backstage_frontend_plugin_api.ExtensionDefinition<TConfig, TConfig, never, never, string | undefined, string | undefined, string | undefined>;
|
|
38
38
|
|
|
39
39
|
/** @alpha */
|
|
40
40
|
declare const catalogTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<"catalog", {
|
|
@@ -9,7 +9,9 @@ function DependencyOfComponentsCard(props) {
|
|
|
9
9
|
const { t } = useTranslationRef(catalogTranslationRef);
|
|
10
10
|
const {
|
|
11
11
|
variant = "gridItem",
|
|
12
|
-
title = t("dependencyOfComponentsCard.title")
|
|
12
|
+
title = t("dependencyOfComponentsCard.title"),
|
|
13
|
+
columns = componentEntityColumns,
|
|
14
|
+
tableOptions = {}
|
|
13
15
|
} = props;
|
|
14
16
|
return /* @__PURE__ */ React.createElement(
|
|
15
17
|
RelatedEntitiesCard,
|
|
@@ -18,10 +20,11 @@ function DependencyOfComponentsCard(props) {
|
|
|
18
20
|
title,
|
|
19
21
|
entityKind: "Component",
|
|
20
22
|
relationType: RELATION_DEPENDENCY_OF,
|
|
21
|
-
columns
|
|
23
|
+
columns,
|
|
22
24
|
emptyMessage: t("dependencyOfComponentsCard.emptyMessage"),
|
|
23
25
|
emptyHelpLink: componentEntityHelpLink,
|
|
24
|
-
asRenderableEntities: asComponentEntities
|
|
26
|
+
asRenderableEntities: asComponentEntities,
|
|
27
|
+
tableOptions
|
|
25
28
|
}
|
|
26
29
|
);
|
|
27
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyOfComponentsCard.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 {
|
|
1
|
+
{"version":3,"file":"DependencyOfComponentsCard.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 {\n ComponentEntity,\n RELATION_DEPENDENCY_OF,\n} from '@backstage/catalog-model';\nimport {\n InfoCardVariants,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\nimport { catalogTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n columns?: TableColumn<ComponentEntity>[];\n tableOptions?: TableOptions;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { t } = useTranslationRef(catalogTranslationRef);\n const {\n variant = 'gridItem',\n title = t('dependencyOfComponentsCard.title'),\n columns = componentEntityColumns,\n tableOptions = {},\n } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={columns}\n emptyMessage={t('dependencyOfComponentsCard.emptyMessage')}\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n tableOptions={tableOptions}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AA2CO,SAAS,2BACd,KACA,EAAA;AACA,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,qBAAqB,CAAA,CAAA;AACrD,EAAM,MAAA;AAAA,IACJ,OAAU,GAAA,UAAA;AAAA,IACV,KAAA,GAAQ,EAAE,kCAAkC,CAAA;AAAA,IAC5C,OAAU,GAAA,sBAAA;AAAA,IACV,eAAe,EAAC;AAAA,GACd,GAAA,KAAA,CAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,sBAAA;AAAA,MACd,OAAA;AAAA,MACA,YAAA,EAAc,EAAE,yCAAyC,CAAA;AAAA,MACzD,aAAe,EAAA,uBAAA;AAAA,MACf,oBAAsB,EAAA,mBAAA;AAAA,MACtB,YAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -7,7 +7,12 @@ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
|
7
7
|
|
|
8
8
|
function HasComponentsCard(props) {
|
|
9
9
|
const { t } = useTranslationRef(catalogTranslationRef);
|
|
10
|
-
const {
|
|
10
|
+
const {
|
|
11
|
+
variant = "gridItem",
|
|
12
|
+
title = t("hasComponentsCard.title"),
|
|
13
|
+
columns = componentEntityColumns,
|
|
14
|
+
tableOptions = {}
|
|
15
|
+
} = props;
|
|
11
16
|
return /* @__PURE__ */ React.createElement(
|
|
12
17
|
RelatedEntitiesCard,
|
|
13
18
|
{
|
|
@@ -15,10 +20,11 @@ function HasComponentsCard(props) {
|
|
|
15
20
|
title,
|
|
16
21
|
entityKind: "Component",
|
|
17
22
|
relationType: RELATION_HAS_PART,
|
|
18
|
-
columns
|
|
23
|
+
columns,
|
|
19
24
|
emptyMessage: t("hasComponentsCard.emptyMessage"),
|
|
20
25
|
emptyHelpLink: componentEntityHelpLink,
|
|
21
|
-
asRenderableEntities: asComponentEntities
|
|
26
|
+
asRenderableEntities: asComponentEntities,
|
|
27
|
+
tableOptions
|
|
22
28
|
}
|
|
23
29
|
);
|
|
24
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HasComponentsCard.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 {
|
|
1
|
+
{"version":3,"file":"HasComponentsCard.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 { ComponentEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport {\n InfoCardVariants,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\nimport { catalogTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n columns?: TableColumn<ComponentEntity>[];\n tableOptions?: TableOptions;\n}\n\nexport function HasComponentsCard(props: HasComponentsCardProps) {\n const { t } = useTranslationRef(catalogTranslationRef);\n const {\n variant = 'gridItem',\n title = t('hasComponentsCard.title'),\n columns = componentEntityColumns,\n tableOptions = {},\n } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={columns}\n emptyMessage={t('hasComponentsCard.emptyMessage')}\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n tableOptions={tableOptions}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAwCO,SAAS,kBAAkB,KAA+B,EAAA;AAC/D,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,qBAAqB,CAAA,CAAA;AACrD,EAAM,MAAA;AAAA,IACJ,OAAU,GAAA,UAAA;AAAA,IACV,KAAA,GAAQ,EAAE,yBAAyB,CAAA;AAAA,IACnC,OAAU,GAAA,sBAAA;AAAA,IACV,eAAe,EAAC;AAAA,GACd,GAAA,KAAA,CAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAA;AAAA,MACA,YAAA,EAAc,EAAE,gCAAgC,CAAA;AAAA,MAChD,aAAe,EAAA,uBAAA;AAAA,MACf,oBAAsB,EAAA,mBAAA;AAAA,MACtB,YAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -7,7 +7,12 @@ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
|
7
7
|
|
|
8
8
|
function HasResourcesCard(props) {
|
|
9
9
|
const { t } = useTranslationRef(catalogTranslationRef);
|
|
10
|
-
const {
|
|
10
|
+
const {
|
|
11
|
+
variant = "gridItem",
|
|
12
|
+
title = t("hasResourcesCard.title"),
|
|
13
|
+
columns = resourceEntityColumns,
|
|
14
|
+
tableOptions = {}
|
|
15
|
+
} = props;
|
|
11
16
|
return /* @__PURE__ */ React.createElement(
|
|
12
17
|
RelatedEntitiesCard,
|
|
13
18
|
{
|
|
@@ -15,10 +20,11 @@ function HasResourcesCard(props) {
|
|
|
15
20
|
title,
|
|
16
21
|
entityKind: "Resource",
|
|
17
22
|
relationType: RELATION_HAS_PART,
|
|
18
|
-
columns
|
|
23
|
+
columns,
|
|
19
24
|
asRenderableEntities: asResourceEntities,
|
|
20
25
|
emptyMessage: t("hasResourcesCard.emptyMessage"),
|
|
21
|
-
emptyHelpLink: resourceEntityHelpLink
|
|
26
|
+
emptyHelpLink: resourceEntityHelpLink,
|
|
27
|
+
tableOptions
|
|
22
28
|
}
|
|
23
29
|
);
|
|
24
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HasResourcesCard.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 {
|
|
1
|
+
{"version":3,"file":"HasResourcesCard.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, ResourceEntity } from '@backstage/catalog-model';\nimport {\n InfoCardVariants,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport React from 'react';\nimport {\n asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\nimport { catalogTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface HasResourcesCardProps {\n variant?: InfoCardVariants;\n title?: string;\n columns?: TableColumn<ResourceEntity>[];\n tableOptions?: TableOptions;\n}\n\nexport function HasResourcesCard(props: HasResourcesCardProps) {\n const { t } = useTranslationRef(catalogTranslationRef);\n const {\n variant = 'gridItem',\n title = t('hasResourcesCard.title'),\n columns = resourceEntityColumns,\n tableOptions = {},\n } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Resource\"\n relationType={RELATION_HAS_PART}\n columns={columns}\n asRenderableEntities={asResourceEntities}\n emptyMessage={t('hasResourcesCard.emptyMessage')}\n emptyHelpLink={resourceEntityHelpLink}\n tableOptions={tableOptions}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAwCO,SAAS,iBAAiB,KAA8B,EAAA;AAC7D,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,qBAAqB,CAAA,CAAA;AACrD,EAAM,MAAA;AAAA,IACJ,OAAU,GAAA,UAAA;AAAA,IACV,KAAA,GAAQ,EAAE,wBAAwB,CAAA;AAAA,IAClC,OAAU,GAAA,qBAAA;AAAA,IACV,eAAe,EAAC;AAAA,GACd,GAAA,KAAA,CAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAW,EAAA,UAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAA;AAAA,MACA,oBAAsB,EAAA,kBAAA;AAAA,MACtB,YAAA,EAAc,EAAE,+BAA+B,CAAA;AAAA,MAC/C,aAAe,EAAA,sBAAA;AAAA,MACf,YAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -9,8 +9,9 @@ function HasSubcomponentsCard(props) {
|
|
|
9
9
|
const { t } = useTranslationRef(catalogTranslationRef);
|
|
10
10
|
const {
|
|
11
11
|
variant = "gridItem",
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
title = t("hasSubcomponentsCard.title"),
|
|
13
|
+
columns = componentEntityColumns,
|
|
14
|
+
tableOptions = {}
|
|
14
15
|
} = props;
|
|
15
16
|
return /* @__PURE__ */ React.createElement(
|
|
16
17
|
RelatedEntitiesCard,
|
|
@@ -19,7 +20,7 @@ function HasSubcomponentsCard(props) {
|
|
|
19
20
|
title,
|
|
20
21
|
entityKind: "Component",
|
|
21
22
|
relationType: RELATION_HAS_PART,
|
|
22
|
-
columns
|
|
23
|
+
columns,
|
|
23
24
|
asRenderableEntities: asComponentEntities,
|
|
24
25
|
emptyMessage: t("hasSubcomponentsCard.emptyMessage"),
|
|
25
26
|
emptyHelpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HasSubcomponentsCard.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 {
|
|
1
|
+
{"version":3,"file":"HasSubcomponentsCard.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 { ComponentEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport {\n InfoCardVariants,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\nimport { catalogTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n columns?: TableColumn<ComponentEntity>[];\n tableOptions?: TableOptions;\n}\n\nexport function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {\n const { t } = useTranslationRef(catalogTranslationRef);\n const {\n variant = 'gridItem',\n title = t('hasSubcomponentsCard.title'),\n columns = componentEntityColumns,\n tableOptions = {},\n } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={columns}\n asRenderableEntities={asComponentEntities}\n emptyMessage={t('hasSubcomponentsCard.emptyMessage')}\n emptyHelpLink=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional\"\n tableOptions={tableOptions}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAuCO,SAAS,qBAAqB,KAAkC,EAAA;AACrE,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,qBAAqB,CAAA,CAAA;AACrD,EAAM,MAAA;AAAA,IACJ,OAAU,GAAA,UAAA;AAAA,IACV,KAAA,GAAQ,EAAE,4BAA4B,CAAA;AAAA,IACtC,OAAU,GAAA,sBAAA;AAAA,IACV,eAAe,EAAC;AAAA,GACd,GAAA,KAAA,CAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAA;AAAA,MACA,oBAAsB,EAAA,mBAAA;AAAA,MACtB,YAAA,EAAc,EAAE,mCAAmC,CAAA;AAAA,MACnD,aAAc,EAAA,mGAAA;AAAA,MACd,YAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -7,7 +7,12 @@ import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
|
7
7
|
|
|
8
8
|
function HasSystemsCard(props) {
|
|
9
9
|
const { t } = useTranslationRef(catalogTranslationRef);
|
|
10
|
-
const {
|
|
10
|
+
const {
|
|
11
|
+
variant = "gridItem",
|
|
12
|
+
title = t("hasSystemsCard.title"),
|
|
13
|
+
columns = systemEntityColumns,
|
|
14
|
+
tableOptions = {}
|
|
15
|
+
} = props;
|
|
11
16
|
return /* @__PURE__ */ React.createElement(
|
|
12
17
|
RelatedEntitiesCard,
|
|
13
18
|
{
|
|
@@ -15,10 +20,11 @@ function HasSystemsCard(props) {
|
|
|
15
20
|
title,
|
|
16
21
|
entityKind: "System",
|
|
17
22
|
relationType: RELATION_HAS_PART,
|
|
18
|
-
columns
|
|
23
|
+
columns,
|
|
19
24
|
asRenderableEntities: asSystemEntities,
|
|
20
25
|
emptyMessage: t("hasSystemsCard.emptyMessage"),
|
|
21
|
-
emptyHelpLink: systemEntityHelpLink
|
|
26
|
+
emptyHelpLink: systemEntityHelpLink,
|
|
27
|
+
tableOptions
|
|
22
28
|
}
|
|
23
29
|
);
|
|
24
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HasSystemsCard.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 {
|
|
1
|
+
{"version":3,"file":"HasSystemsCard.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, SystemEntity } from '@backstage/catalog-model';\nimport {\n InfoCardVariants,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\nimport { catalogTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n columns?: TableColumn<SystemEntity>[];\n tableOptions?: TableOptions;\n}\n\nexport function HasSystemsCard(props: HasSystemsCardProps) {\n const { t } = useTranslationRef(catalogTranslationRef);\n const {\n variant = 'gridItem',\n title = t('hasSystemsCard.title'),\n columns = systemEntityColumns,\n tableOptions = {},\n } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"System\"\n relationType={RELATION_HAS_PART}\n columns={columns}\n asRenderableEntities={asSystemEntities}\n emptyMessage={t('hasSystemsCard.emptyMessage')}\n emptyHelpLink={systemEntityHelpLink}\n tableOptions={tableOptions}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAwCO,SAAS,eAAe,KAA4B,EAAA;AACzD,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,qBAAqB,CAAA,CAAA;AACrD,EAAM,MAAA;AAAA,IACJ,OAAU,GAAA,UAAA;AAAA,IACV,KAAA,GAAQ,EAAE,sBAAsB,CAAA;AAAA,IAChC,OAAU,GAAA,mBAAA;AAAA,IACV,eAAe,EAAC;AAAA,GACd,GAAA,KAAA,CAAA;AACJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAW,EAAA,QAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAA;AAAA,MACA,oBAAsB,EAAA,gBAAA;AAAA,MACtB,YAAA,EAAc,EAAE,6BAA6B,CAAA;AAAA,MAC7C,aAAe,EAAA,oBAAA;AAAA,MACf,YAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Entity, CompoundEntityRef, ComponentEntity, ResourceEntity } from '@backstage/catalog-model';
|
|
2
|
+
import { Entity, CompoundEntityRef, ComponentEntity, ResourceEntity, SystemEntity } from '@backstage/catalog-model';
|
|
3
3
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
4
|
import { IconComponent, StorageApi, ApiHolder } from '@backstage/core-plugin-api';
|
|
5
5
|
import { EntityRefPresentationSnapshot, CatalogApi, EntityPresentationApi, EntityRefPresentation, StarredEntitiesApi, EntityListContextProps, UserListFilterKind, EntityOwnerPickerProps } from '@backstage/plugin-catalog-react';
|
|
@@ -522,6 +522,8 @@ interface DefaultCatalogPageProps {
|
|
|
522
522
|
interface DependencyOfComponentsCardProps {
|
|
523
523
|
variant?: InfoCardVariants;
|
|
524
524
|
title?: string;
|
|
525
|
+
columns?: TableColumn<ComponentEntity>[];
|
|
526
|
+
tableOptions?: TableOptions;
|
|
525
527
|
}
|
|
526
528
|
|
|
527
529
|
/** @public */
|
|
@@ -544,19 +546,24 @@ interface DependsOnResourcesCardProps {
|
|
|
544
546
|
interface HasComponentsCardProps {
|
|
545
547
|
variant?: InfoCardVariants;
|
|
546
548
|
title?: string;
|
|
549
|
+
columns?: TableColumn<ComponentEntity>[];
|
|
550
|
+
tableOptions?: TableOptions;
|
|
547
551
|
}
|
|
548
552
|
|
|
549
553
|
/** @public */
|
|
550
554
|
interface HasResourcesCardProps {
|
|
551
555
|
variant?: InfoCardVariants;
|
|
552
556
|
title?: string;
|
|
557
|
+
columns?: TableColumn<ResourceEntity>[];
|
|
558
|
+
tableOptions?: TableOptions;
|
|
553
559
|
}
|
|
554
560
|
|
|
555
561
|
/** @public */
|
|
556
562
|
interface HasSubcomponentsCardProps {
|
|
557
563
|
variant?: InfoCardVariants;
|
|
558
|
-
tableOptions?: TableOptions;
|
|
559
564
|
title?: string;
|
|
565
|
+
columns?: TableColumn<ComponentEntity>[];
|
|
566
|
+
tableOptions?: TableOptions;
|
|
560
567
|
}
|
|
561
568
|
|
|
562
569
|
/** @public */
|
|
@@ -570,6 +577,8 @@ interface HasSubdomainsCardProps {
|
|
|
570
577
|
interface HasSystemsCardProps {
|
|
571
578
|
variant?: InfoCardVariants;
|
|
572
579
|
title?: string;
|
|
580
|
+
columns?: TableColumn<SystemEntity>[];
|
|
581
|
+
tableOptions?: TableOptions;
|
|
573
582
|
}
|
|
574
583
|
|
|
575
584
|
/** @public */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog",
|
|
3
|
-
"version": "1.22.0-next.
|
|
3
|
+
"version": "1.22.0-next.3",
|
|
4
4
|
"description": "The Backstage plugin for browsing the Backstage catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -57,20 +57,20 @@
|
|
|
57
57
|
"test": "backstage-cli package test"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@backstage/catalog-client": "^1.6.
|
|
61
|
-
"@backstage/catalog-model": "^1.
|
|
62
|
-
"@backstage/core-compat-api": "^0.2.8-next.
|
|
60
|
+
"@backstage/catalog-client": "^1.6.6-next.0",
|
|
61
|
+
"@backstage/catalog-model": "^1.6.0-next.0",
|
|
62
|
+
"@backstage/core-compat-api": "^0.2.8-next.3",
|
|
63
63
|
"@backstage/core-components": "^0.14.10-next.0",
|
|
64
64
|
"@backstage/core-plugin-api": "^1.9.3",
|
|
65
65
|
"@backstage/errors": "^1.2.4",
|
|
66
|
-
"@backstage/frontend-plugin-api": "^0.7.0-next.
|
|
66
|
+
"@backstage/frontend-plugin-api": "^0.7.0-next.3",
|
|
67
67
|
"@backstage/integration-react": "^1.1.30-next.0",
|
|
68
|
-
"@backstage/plugin-catalog-common": "^1.0.26-next.
|
|
69
|
-
"@backstage/plugin-catalog-react": "^1.12.3-next.
|
|
68
|
+
"@backstage/plugin-catalog-common": "^1.0.26-next.2",
|
|
69
|
+
"@backstage/plugin-catalog-react": "^1.12.3-next.3",
|
|
70
70
|
"@backstage/plugin-permission-react": "^0.4.25-next.1",
|
|
71
|
-
"@backstage/plugin-scaffolder-common": "^1.5.5-next.
|
|
71
|
+
"@backstage/plugin-scaffolder-common": "^1.5.5-next.2",
|
|
72
72
|
"@backstage/plugin-search-common": "^1.2.14-next.1",
|
|
73
|
-
"@backstage/plugin-search-react": "^1.7.14-next.
|
|
73
|
+
"@backstage/plugin-search-react": "^1.7.14-next.3",
|
|
74
74
|
"@backstage/types": "^1.1.1",
|
|
75
75
|
"@material-ui/core": "^4.12.2",
|
|
76
76
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"zen-observable": "^0.10.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@backstage/cli": "^0.27.0-next.
|
|
89
|
+
"@backstage/cli": "^0.27.0-next.4",
|
|
90
90
|
"@backstage/core-app-api": "^1.14.2-next.0",
|
|
91
|
-
"@backstage/dev-utils": "^1.0.37-next.
|
|
91
|
+
"@backstage/dev-utils": "^1.0.37-next.3",
|
|
92
92
|
"@backstage/plugin-permission-common": "^0.8.1-next.1",
|
|
93
93
|
"@backstage/test-utils": "^1.5.10-next.2",
|
|
94
94
|
"@testing-library/dom": "^10.0.0",
|