@backstage/plugin-catalog 1.32.2 → 1.33.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 +47 -0
- package/dist/alpha/DefaultEntityContentLayout.esm.js +7 -0
- package/dist/alpha/DefaultEntityContentLayout.esm.js.map +1 -1
- package/dist/alpha/translation.esm.js +2 -1
- package/dist/alpha/translation.esm.js.map +1 -1
- package/dist/alpha.d.ts +29 -21
- package/dist/components/CatalogTable/columns.esm.js +1 -1
- package/dist/components/CatalogTable/columns.esm.js.map +1 -1
- package/dist/components/EntityOrphanWarning/DeleteEntityDialog.esm.js +6 -18
- package/dist/components/EntityOrphanWarning/DeleteEntityDialog.esm.js.map +1 -1
- package/dist/components/EntityOrphanWarning/EntityOrphanWarning.esm.js +19 -2
- package/dist/components/EntityOrphanWarning/EntityOrphanWarning.esm.js.map +1 -1
- package/dist/package.json.esm.js +2 -1
- package/dist/package.json.esm.js.map +1 -1
- package/package.json +26 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.33.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 05aac34: Migrated `DeleteEntityDialog` and `EntityOrphanWarning` components to Backstage UI.
|
|
8
|
+
|
|
9
|
+
The `deleteEntity.description` translation key no longer includes "Click here to delete" text. A new `deleteEntity.actionButtonTitle` key was added for the action button.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 8d4c48b: Fixed vertical spacing between tags in the catalog table.
|
|
14
|
+
- e8258d0: The default entity content layout still supports rendering summary cards at runtime for backward compatibility, but logs a console warning when they are detected to help identify where migration is needed.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/plugin-catalog-react@1.22.0-next.1
|
|
17
|
+
- @backstage/ui@0.12.0-next.1
|
|
18
|
+
- @backstage/frontend-plugin-api@0.14.0-next.1
|
|
19
|
+
- @backstage/core-compat-api@0.5.8-next.1
|
|
20
|
+
- @backstage/plugin-search-react@1.10.3-next.1
|
|
21
|
+
- @backstage/core-components@0.18.7-next.1
|
|
22
|
+
- @backstage/plugin-techdocs-react@1.3.8-next.0
|
|
23
|
+
- @backstage/integration-react@1.2.15-next.1
|
|
24
|
+
- @backstage/plugin-scaffolder-common@1.7.6-next.1
|
|
25
|
+
|
|
26
|
+
## 1.32.3-next.0
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
- @backstage/plugin-catalog-react@1.21.6-next.0
|
|
32
|
+
- @backstage/core-components@0.18.6-next.0
|
|
33
|
+
- @backstage/plugin-search-common@1.2.22-next.0
|
|
34
|
+
- @backstage/core-compat-api@0.5.7-next.0
|
|
35
|
+
- @backstage/frontend-plugin-api@0.14.0-next.0
|
|
36
|
+
- @backstage/core-plugin-api@1.12.2-next.0
|
|
37
|
+
- @backstage/plugin-techdocs-react@1.3.8-next.0
|
|
38
|
+
- @backstage/plugin-search-react@1.10.3-next.0
|
|
39
|
+
- @backstage/catalog-client@1.12.1
|
|
40
|
+
- @backstage/catalog-model@1.7.6
|
|
41
|
+
- @backstage/errors@1.2.7
|
|
42
|
+
- @backstage/integration-react@1.2.15-next.0
|
|
43
|
+
- @backstage/types@1.2.2
|
|
44
|
+
- @backstage/version-bridge@1.0.11
|
|
45
|
+
- @backstage/plugin-catalog-common@1.1.8-next.0
|
|
46
|
+
- @backstage/plugin-permission-react@0.4.40-next.0
|
|
47
|
+
- @backstage/plugin-scaffolder-common@1.7.6-next.0
|
|
48
|
+
- @backstage/plugin-techdocs-common@0.1.1
|
|
49
|
+
|
|
3
50
|
## 1.32.2
|
|
4
51
|
|
|
5
52
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ import { hasRelationWarnings, EntityRelationWarning } from '../components/Entity
|
|
|
7
7
|
import { hasCatalogProcessingErrors, EntityProcessingErrorsPanel } from '../components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.esm.js';
|
|
8
8
|
import { HorizontalScrollGrid } from '@backstage/core-components';
|
|
9
9
|
|
|
10
|
+
let hasLoggedSummaryWarning = false;
|
|
10
11
|
const useStyles = makeStyles((theme) => ({
|
|
11
12
|
root: {
|
|
12
13
|
display: "flex",
|
|
@@ -113,6 +114,12 @@ function DefaultEntityContentLayout(props) {
|
|
|
113
114
|
const contentCards = cards.filter(
|
|
114
115
|
(card) => !card.type || card.type === "content"
|
|
115
116
|
);
|
|
117
|
+
if (summaryCards.length > 0 && !hasLoggedSummaryWarning) {
|
|
118
|
+
hasLoggedSummaryWarning = true;
|
|
119
|
+
console.warn(
|
|
120
|
+
"The 'summary' entity card type has been removed. Please update your cards to use 'content' or 'info' types instead."
|
|
121
|
+
);
|
|
122
|
+
}
|
|
116
123
|
const classes = useStyles({
|
|
117
124
|
infoCards: !!infoCards.length,
|
|
118
125
|
summaryCards: !!summaryCards.length,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultEntityContentLayout.esm.js","sources":["../../src/alpha/DefaultEntityContentLayout.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Fragment } from 'react';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport { EntityContentLayoutProps } from '@backstage/plugin-catalog-react/alpha';\nimport { EntitySwitch } from '../components/EntitySwitch';\nimport {\n EntityOrphanWarning,\n isOrphan,\n} from '../components/EntityOrphanWarning';\nimport {\n EntityRelationWarning,\n hasRelationWarnings,\n} from '../components/EntityRelationWarning';\nimport {\n EntityProcessingErrorsPanel,\n hasCatalogProcessingErrors,\n} from '../components/EntityProcessingErrorsPanel';\nimport { HorizontalScrollGrid } from '@backstage/core-components';\n\nconst useStyles = makeStyles<\n Theme,\n { infoCards: boolean; summaryCards: boolean; contentCards: boolean }\n>(theme => ({\n root: {\n display: 'flex',\n flexFlow: 'column nowrap',\n gap: theme.spacing(3),\n },\n warningArea: {\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n marginBottom: theme.spacing(3),\n '&:empty': {\n marginBottom: 0,\n display: 'none',\n },\n },\n mainContent: {\n display: 'flex',\n flexFlow: 'column',\n gap: theme.spacing(3),\n alignItems: 'stretch',\n minWidth: 0,\n },\n infoArea: {\n display: 'flex',\n flexFlow: 'column nowrap',\n alignItems: 'stretch',\n gap: theme.spacing(3),\n minWidth: 0,\n '& > *': {\n flexShrink: 0,\n flexGrow: 0,\n },\n },\n summaryArea: {\n minWidth: 0,\n margin: theme.spacing(1), // To counteract MUI negative grid margin\n },\n summaryCard: {\n flex: '0 0 auto',\n width: '100%',\n '& + &': {\n marginLeft: theme.spacing(3),\n },\n },\n contentArea: {\n display: 'flex',\n flexFlow: 'column',\n gap: theme.spacing(3),\n alignItems: 'stretch',\n minWidth: 0,\n },\n [theme.breakpoints.up('md')]: {\n root: {\n display: 'grid',\n gap: theme.spacing(3),\n gridTemplateAreas: ({ summaryCards }) => `\n \"${summaryCards ? 'summary' : 'content'} info\"\n \"content info\"\n `,\n gridTemplateColumns: ({ infoCards }) => (infoCards ? '2fr 1fr' : '1fr'),\n alignItems: 'start',\n },\n mainContent: {\n display: 'contents',\n },\n contentArea: {\n gridArea: 'content',\n },\n summaryArea: {\n gridArea: 'summary',\n margin: theme.spacing(1), // To counteract MUI negative grid margin\n },\n infoArea: {\n gridArea: 'info',\n position: 'sticky',\n top: theme.spacing(3),\n // this is a little unfortunate, but it's required to make the info cards scrollable\n // in a fixed container of the full height when it's stuck.\n // 100% doesn't work as that's the height of the entire layout, which is what powers the card scrolling.\n maxHeight: '100vh',\n overflowY: 'auto',\n alignSelf: 'start',\n alignItems: 'stretch',\n // Hide the scrollbar for the inner info cards\n // kind of an accessibility nightmare, but we see.\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n '&::-webkit-scrollbar': {\n display: 'none',\n },\n },\n summaryCard: {\n width: 'auto',\n },\n },\n}));\n\nexport function DefaultEntityContentLayout(props: EntityContentLayoutProps) {\n const { cards } = props;\n\n const infoCards = cards.filter(card => card.type === 'info');\n const summaryCards = cards.filter(card => card.type === 'summary');\n const contentCards = cards.filter(\n card => !card.type || card.type === 'content',\n );\n\n const classes = useStyles({\n infoCards: !!infoCards.length,\n summaryCards: !!summaryCards.length,\n contentCards: !!contentCards.length,\n });\n\n return (\n <>\n <div className={classes.warningArea}>\n <EntitySwitch>\n <EntitySwitch.Case if={isOrphan}>\n <EntityOrphanWarning />\n </EntitySwitch.Case>\n </EntitySwitch>\n\n <EntitySwitch>\n <EntitySwitch.Case if={hasRelationWarnings}>\n <EntityRelationWarning />\n </EntitySwitch.Case>\n </EntitySwitch>\n\n <EntitySwitch>\n <EntitySwitch.Case if={hasCatalogProcessingErrors}>\n <EntityProcessingErrorsPanel />\n </EntitySwitch.Case>\n </EntitySwitch>\n </div>\n <div className={classes.root}>\n {infoCards.length > 0 ? (\n <div className={classes.infoArea}>\n {infoCards.map((card, index) => (\n <Fragment key={card.element.key ?? index}>\n {card.element}\n </Fragment>\n ))}\n </div>\n ) : null}\n <div className={classes.mainContent}>\n {summaryCards.length > 0 ? (\n <div className={classes.summaryArea}>\n <HorizontalScrollGrid scrollStep={400} scrollSpeed={100}>\n {summaryCards.map((card, index) => (\n <div\n key={card.element.key ?? index}\n className={classes.summaryCard}\n >\n {card.element}\n </div>\n ))}\n </HorizontalScrollGrid>\n </div>\n ) : null}\n {contentCards.length > 0 ? (\n <div className={classes.contentArea}>\n {contentCards.map((card, index) => (\n <Fragment key={card.element.key ?? index}>\n {card.element}\n </Fragment>\n ))}\n </div>\n ) : null}\n </div>\n </div>\n </>\n );\n}\n"],"names":["Fragment"],"mappings":";;;;;;;;;AAkCA,MAAM,SAAA,GAAY,WAGhB,CAAA,KAAA,MAAU;AAAA,EACV,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU,eAAA;AAAA,IACV,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,GACtB;AAAA,EACA,WAAA,EAAa;AAAA,IACX,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,QAAA;AAAA,IACf,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACpB,YAAA,EAAc,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC7B,SAAA,EAAW;AAAA,MACT,YAAA,EAAc,CAAA;AAAA,MACd,OAAA,EAAS;AAAA;AACX,GACF;AAAA,EACA,WAAA,EAAa;AAAA,IACX,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU,QAAA;AAAA,IACV,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACpB,UAAA,EAAY,SAAA;AAAA,IACZ,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU,eAAA;AAAA,IACV,UAAA,EAAY,SAAA;AAAA,IACZ,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACpB,QAAA,EAAU,CAAA;AAAA,IACV,OAAA,EAAS;AAAA,MACP,UAAA,EAAY,CAAA;AAAA,MACZ,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,WAAA,EAAa;AAAA,IACX,QAAA,EAAU,CAAA;AAAA,IACV,MAAA,EAAQ,KAAA,CAAM,OAAA,CAAQ,CAAC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A;AAAA,UAAA;AAAA,YAEC,WAAW,OAAA,CAAQ,WAAA;AAAA,YAElB,QAAA,EAAA,IAAA,CAAK;AAAA,WAAA;AAAA,UAHD,IAAA,CAAK,QAAQ,GAAA,IAAO;AAAA,SAK5B,CAAA,EACH,CAAA,EACF,CAAA,GACE,IAAA;AAAA,QACH,YAAA,CAAa,MAAA,GAAS,CAAA,mBACrB,GAAA,CAAC,KAAA,EAAA,EAAI,WAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA,YAAA,CAAa,GAAA,CAAI,CAAC,IAAA,EAAM,0BACvB,GAAA,CAACA,UAAAA,EAAA,EACE,QAAA,EAAA,IAAA,CAAK,OAAA,EAAA,EADO,IAAA,CAAK,QAAQ,GAAA,IAAO,KAEnC,CACD,CAAA,EACH,CAAA,GACE;AAAA,OAAA,EACN;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"DefaultEntityContentLayout.esm.js","sources":["../../src/alpha/DefaultEntityContentLayout.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Fragment } from 'react';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport { EntityContentLayoutProps } from '@backstage/plugin-catalog-react/alpha';\nimport { EntitySwitch } from '../components/EntitySwitch';\nimport {\n EntityOrphanWarning,\n isOrphan,\n} from '../components/EntityOrphanWarning';\nimport {\n EntityRelationWarning,\n hasRelationWarnings,\n} from '../components/EntityRelationWarning';\nimport {\n EntityProcessingErrorsPanel,\n hasCatalogProcessingErrors,\n} from '../components/EntityProcessingErrorsPanel';\nimport { HorizontalScrollGrid } from '@backstage/core-components';\n\n// Module-level flag to ensure deprecation warning is only logged once\nlet hasLoggedSummaryWarning = false;\n\nconst useStyles = makeStyles<\n Theme,\n { infoCards: boolean; summaryCards: boolean; contentCards: boolean }\n>(theme => ({\n root: {\n display: 'flex',\n flexFlow: 'column nowrap',\n gap: theme.spacing(3),\n },\n warningArea: {\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n marginBottom: theme.spacing(3),\n '&:empty': {\n marginBottom: 0,\n display: 'none',\n },\n },\n mainContent: {\n display: 'flex',\n flexFlow: 'column',\n gap: theme.spacing(3),\n alignItems: 'stretch',\n minWidth: 0,\n },\n infoArea: {\n display: 'flex',\n flexFlow: 'column nowrap',\n alignItems: 'stretch',\n gap: theme.spacing(3),\n minWidth: 0,\n '& > *': {\n flexShrink: 0,\n flexGrow: 0,\n },\n },\n summaryArea: {\n minWidth: 0,\n margin: theme.spacing(1), // To counteract MUI negative grid margin\n },\n summaryCard: {\n flex: '0 0 auto',\n width: '100%',\n '& + &': {\n marginLeft: theme.spacing(3),\n },\n },\n contentArea: {\n display: 'flex',\n flexFlow: 'column',\n gap: theme.spacing(3),\n alignItems: 'stretch',\n minWidth: 0,\n },\n [theme.breakpoints.up('md')]: {\n root: {\n display: 'grid',\n gap: theme.spacing(3),\n gridTemplateAreas: ({ summaryCards }) => `\n \"${summaryCards ? 'summary' : 'content'} info\"\n \"content info\"\n `,\n gridTemplateColumns: ({ infoCards }) => (infoCards ? '2fr 1fr' : '1fr'),\n alignItems: 'start',\n },\n mainContent: {\n display: 'contents',\n },\n contentArea: {\n gridArea: 'content',\n },\n summaryArea: {\n gridArea: 'summary',\n margin: theme.spacing(1), // To counteract MUI negative grid margin\n },\n infoArea: {\n gridArea: 'info',\n position: 'sticky',\n top: theme.spacing(3),\n // this is a little unfortunate, but it's required to make the info cards scrollable\n // in a fixed container of the full height when it's stuck.\n // 100% doesn't work as that's the height of the entire layout, which is what powers the card scrolling.\n maxHeight: '100vh',\n overflowY: 'auto',\n alignSelf: 'start',\n alignItems: 'stretch',\n // Hide the scrollbar for the inner info cards\n // kind of an accessibility nightmare, but we see.\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n '&::-webkit-scrollbar': {\n display: 'none',\n },\n },\n summaryCard: {\n width: 'auto',\n },\n },\n}));\n\nexport function DefaultEntityContentLayout(props: EntityContentLayoutProps) {\n const { cards } = props;\n\n const infoCards = cards.filter(card => card.type === 'info');\n // Keep support for 'summary' type at runtime for backward compatibility\n // even though it's been removed from the type system\n const summaryCards = cards.filter(card => card.type === ('summary' as any));\n const contentCards = cards.filter(\n card => !card.type || card.type === 'content',\n );\n\n if (summaryCards.length > 0 && !hasLoggedSummaryWarning) {\n hasLoggedSummaryWarning = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"The 'summary' entity card type has been removed. Please update your cards to use 'content' or 'info' types instead.\",\n );\n }\n\n const classes = useStyles({\n infoCards: !!infoCards.length,\n summaryCards: !!summaryCards.length,\n contentCards: !!contentCards.length,\n });\n\n return (\n <>\n <div className={classes.warningArea}>\n <EntitySwitch>\n <EntitySwitch.Case if={isOrphan}>\n <EntityOrphanWarning />\n </EntitySwitch.Case>\n </EntitySwitch>\n\n <EntitySwitch>\n <EntitySwitch.Case if={hasRelationWarnings}>\n <EntityRelationWarning />\n </EntitySwitch.Case>\n </EntitySwitch>\n\n <EntitySwitch>\n <EntitySwitch.Case if={hasCatalogProcessingErrors}>\n <EntityProcessingErrorsPanel />\n </EntitySwitch.Case>\n </EntitySwitch>\n </div>\n <div className={classes.root}>\n {infoCards.length > 0 ? (\n <div className={classes.infoArea}>\n {infoCards.map((card, index) => (\n <Fragment key={card.element.key ?? index}>\n {card.element}\n </Fragment>\n ))}\n </div>\n ) : null}\n <div className={classes.mainContent}>\n {summaryCards.length > 0 ? (\n <div className={classes.summaryArea}>\n <HorizontalScrollGrid scrollStep={400} scrollSpeed={100}>\n {summaryCards.map((card, index) => (\n <div\n key={card.element.key ?? index}\n className={classes.summaryCard}\n >\n {card.element}\n </div>\n ))}\n </HorizontalScrollGrid>\n </div>\n ) : null}\n {contentCards.length > 0 ? (\n <div className={classes.contentArea}>\n {contentCards.map((card, index) => (\n <Fragment key={card.element.key ?? index}>\n {card.element}\n </Fragment>\n ))}\n </div>\n ) : null}\n </div>\n </div>\n </>\n );\n}\n"],"names":["Fragment"],"mappings":";;;;;;;;;AAmCA,IAAI,uBAAA,GAA0B,KAAA;AAE9B,MAAM,SAAA,GAAY,WAGhB,CAAA,KAAA,MAAU;AAAA,EACV,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU,eAAA;AAAA,IACV,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,GACtB;AAAA,EACA,WAAA,EAAa;AAAA,IACX,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,QAAA;AAAA,IACf,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACpB,YAAA,EAAc,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC7B,SAAA,EAAW;AAAA,MACT,YAAA,EAAc,CAAA;AAAA,MACd,OAAA,EAAS;AAAA;AACX,GACF;AAAA,EACA,WAAA,EAAa;AAAA,IACX,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU,QAAA;AAAA,IACV,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACpB,UAAA,EAAY,SAAA;AAAA,IACZ,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU,eAAA;AAAA,IACV,UAAA,EAAY,SAAA;AAAA,IACZ,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACpB,QAAA,EAAU,CAAA;AAAA,IACV,O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ACE,IAAA;AAAA,sBACJ,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA;AAAA,QAAA,YAAA,CAAa,SAAS,CAAA,mBACrB,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,WAAA,EACtB,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,UAAA,EAAY,KAAK,WAAA,EAAa,GAAA,EACjD,uBAAa,GAAA,CAAI,CAAC,MAAM,KAAA,qBACvB,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YAEC,WAAW,OAAA,CAAQ,WAAA;AAAA,YAElB,QAAA,EAAA,IAAA,CAAK;AAAA,WAAA;AAAA,UAHD,IAAA,CAAK,QAAQ,GAAA,IAAO;AAAA,SAK5B,CAAA,EACH,CAAA,EACF,CAAA,GACE,IAAA;AAAA,QACH,YAAA,CAAa,MAAA,GAAS,CAAA,mBACrB,GAAA,CAAC,KAAA,EAAA,EAAI,WAAW,OAAA,CAAQ,WAAA,EACrB,QAAA,EAAA,YAAA,CAAa,GAAA,CAAI,CAAC,IAAA,EAAM,0BACvB,GAAA,CAACA,UAAAA,EAAA,EACE,QAAA,EAAA,IAAA,CAAK,OAAA,EAAA,EADO,IAAA,CAAK,QAAQ,GAAA,IAAO,KAEnC,CACD,CAAA,EACH,CAAA,GACE;AAAA,OAAA,EACN;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -105,7 +105,8 @@ const catalogTranslationRef = createTranslationRef({
|
|
|
105
105
|
dialogTitle: "Are you sure you want to delete this entity?",
|
|
106
106
|
deleteButtonTitle: "Delete",
|
|
107
107
|
cancelButtonTitle: "Cancel",
|
|
108
|
-
description: "This entity is not referenced by any location and is therefore not receiving updates.
|
|
108
|
+
description: "This entity is not referenced by any location and is therefore not receiving updates.",
|
|
109
|
+
actionButtonTitle: "Delete entity"
|
|
109
110
|
},
|
|
110
111
|
entityProcessingErrorsDescription: "The error below originates from",
|
|
111
112
|
entityRelationWarningDescription: "This entity has relations to other entities, which can't be found in the catalog.\n Entities not found are: ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../../src/alpha/translation.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates.
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../../src/alpha/translation.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates.',\n actionButtonTitle: 'Delete entity',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoom to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,wBAAwB,oBAAA,CAAqB;AAAA,EACxD,EAAA,EAAI,SAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;A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;AAAA,MACF,iBAAA,EAAmB;AAAA,KACrB;AAAA,IACA,iCAAA,EAAmC,iCAAA;AAAA,IACnC,gCAAA,EACE,8GAAA;AAAA,IACF,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO,gBAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,KAAA,EAAO,eAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,oBAAA,EAAsB;AAAA,MACpB,KAAA,EAAO,mBAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO,gBAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,KAAA,EAAO,aAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,mBAAA,EAAqB;AAAA,MACnB,kBAAA,EAAoB;AAAA,KACtB;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO,gBAAA;AAAA,MACP,WAAA,EAAa,8CAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,MAAA,EAAQ,SAAA;AAAA,QACR,QAAA,EAAU,UAAA;AAAA,QACV,SAAA,EAAW;AAAA;AACb;AACF;AAEJ,CAAC;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -157,11 +157,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
157
157
|
"entity-card:catalog/about": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
|
|
158
158
|
config: {
|
|
159
159
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
160
|
-
type: "content" | "
|
|
160
|
+
type: "content" | "info" | undefined;
|
|
161
161
|
};
|
|
162
162
|
configInput: {
|
|
163
163
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
164
|
-
type?: "content" | "
|
|
164
|
+
type?: "content" | "info" | undefined;
|
|
165
165
|
};
|
|
166
166
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
167
167
|
optional: true;
|
|
@@ -178,6 +178,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
178
178
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<() => _backstage_core_components.IconLinkVerticalProps, "entity-icon-link-props", {}>, {
|
|
179
179
|
singleton: false;
|
|
180
180
|
optional: false;
|
|
181
|
+
internal: false;
|
|
181
182
|
}>;
|
|
182
183
|
};
|
|
183
184
|
kind: "entity-card";
|
|
@@ -193,11 +194,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
193
194
|
name: "depends-on-components";
|
|
194
195
|
config: {
|
|
195
196
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
196
|
-
type: "content" | "
|
|
197
|
+
type: "content" | "info" | undefined;
|
|
197
198
|
};
|
|
198
199
|
configInput: {
|
|
199
200
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
200
|
-
type?: "content" | "
|
|
201
|
+
type?: "content" | "info" | undefined;
|
|
201
202
|
};
|
|
202
203
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
203
204
|
optional: true;
|
|
@@ -218,11 +219,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
218
219
|
name: "depends-on-resources";
|
|
219
220
|
config: {
|
|
220
221
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
221
|
-
type: "content" | "
|
|
222
|
+
type: "content" | "info" | undefined;
|
|
222
223
|
};
|
|
223
224
|
configInput: {
|
|
224
225
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
225
|
-
type?: "content" | "
|
|
226
|
+
type?: "content" | "info" | undefined;
|
|
226
227
|
};
|
|
227
228
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
228
229
|
optional: true;
|
|
@@ -243,11 +244,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
243
244
|
name: "has-components";
|
|
244
245
|
config: {
|
|
245
246
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
246
|
-
type: "content" | "
|
|
247
|
+
type: "content" | "info" | undefined;
|
|
247
248
|
};
|
|
248
249
|
configInput: {
|
|
249
250
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
250
|
-
type?: "content" | "
|
|
251
|
+
type?: "content" | "info" | undefined;
|
|
251
252
|
};
|
|
252
253
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
253
254
|
optional: true;
|
|
@@ -268,11 +269,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
268
269
|
name: "has-resources";
|
|
269
270
|
config: {
|
|
270
271
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
271
|
-
type: "content" | "
|
|
272
|
+
type: "content" | "info" | undefined;
|
|
272
273
|
};
|
|
273
274
|
configInput: {
|
|
274
275
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
275
|
-
type?: "content" | "
|
|
276
|
+
type?: "content" | "info" | undefined;
|
|
276
277
|
};
|
|
277
278
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
278
279
|
optional: true;
|
|
@@ -293,11 +294,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
293
294
|
name: "has-subcomponents";
|
|
294
295
|
config: {
|
|
295
296
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
296
|
-
type: "content" | "
|
|
297
|
+
type: "content" | "info" | undefined;
|
|
297
298
|
};
|
|
298
299
|
configInput: {
|
|
299
300
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
300
|
-
type?: "content" | "
|
|
301
|
+
type?: "content" | "info" | undefined;
|
|
301
302
|
};
|
|
302
303
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
303
304
|
optional: true;
|
|
@@ -318,11 +319,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
318
319
|
name: "has-subdomains";
|
|
319
320
|
config: {
|
|
320
321
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
321
|
-
type: "content" | "
|
|
322
|
+
type: "content" | "info" | undefined;
|
|
322
323
|
};
|
|
323
324
|
configInput: {
|
|
324
325
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
325
|
-
type?: "content" | "
|
|
326
|
+
type?: "content" | "info" | undefined;
|
|
326
327
|
};
|
|
327
328
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
328
329
|
optional: true;
|
|
@@ -343,11 +344,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
343
344
|
name: "has-systems";
|
|
344
345
|
config: {
|
|
345
346
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
346
|
-
type: "content" | "
|
|
347
|
+
type: "content" | "info" | undefined;
|
|
347
348
|
};
|
|
348
349
|
configInput: {
|
|
349
350
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
350
|
-
type?: "content" | "
|
|
351
|
+
type?: "content" | "info" | undefined;
|
|
351
352
|
};
|
|
352
353
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
353
354
|
optional: true;
|
|
@@ -368,11 +369,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
368
369
|
name: "labels";
|
|
369
370
|
config: {
|
|
370
371
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
371
|
-
type: "content" | "
|
|
372
|
+
type: "content" | "info" | undefined;
|
|
372
373
|
};
|
|
373
374
|
configInput: {
|
|
374
375
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
375
|
-
type?: "content" | "
|
|
376
|
+
type?: "content" | "info" | undefined;
|
|
376
377
|
};
|
|
377
378
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
378
379
|
optional: true;
|
|
@@ -393,11 +394,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
393
394
|
name: "links";
|
|
394
395
|
config: {
|
|
395
396
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
396
|
-
type: "content" | "
|
|
397
|
+
type: "content" | "info" | undefined;
|
|
397
398
|
};
|
|
398
399
|
configInput: {
|
|
399
400
|
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
400
|
-
type?: "content" | "
|
|
401
|
+
type?: "content" | "info" | undefined;
|
|
401
402
|
};
|
|
402
403
|
output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
403
404
|
optional: true;
|
|
@@ -443,6 +444,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
443
444
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(props: _backstage_plugin_catalog_react_alpha.EntityContentLayoutProps) => React.JSX.Element, "catalog.entity-content-layout.component", {}>, {
|
|
444
445
|
singleton: false;
|
|
445
446
|
optional: false;
|
|
447
|
+
internal: false;
|
|
446
448
|
}>;
|
|
447
449
|
cards: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
448
450
|
optional: true;
|
|
@@ -453,6 +455,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
453
455
|
}>, {
|
|
454
456
|
singleton: false;
|
|
455
457
|
optional: false;
|
|
458
|
+
internal: false;
|
|
456
459
|
}>;
|
|
457
460
|
};
|
|
458
461
|
kind: "entity-content";
|
|
@@ -579,6 +582,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
579
582
|
filters: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}>, {
|
|
580
583
|
singleton: false;
|
|
581
584
|
optional: false;
|
|
585
|
+
internal: false;
|
|
582
586
|
}>;
|
|
583
587
|
};
|
|
584
588
|
kind: "page";
|
|
@@ -614,6 +618,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
614
618
|
}>, {
|
|
615
619
|
singleton: false;
|
|
616
620
|
optional: false;
|
|
621
|
+
internal: false;
|
|
617
622
|
}>;
|
|
618
623
|
contents: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
619
624
|
optional: true;
|
|
@@ -626,12 +631,14 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
626
631
|
}>, {
|
|
627
632
|
singleton: false;
|
|
628
633
|
optional: false;
|
|
634
|
+
internal: false;
|
|
629
635
|
}>;
|
|
630
636
|
contextMenuItems: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
631
637
|
optional: true;
|
|
632
638
|
}>, {
|
|
633
639
|
singleton: false;
|
|
634
640
|
optional: false;
|
|
641
|
+
internal: false;
|
|
635
642
|
}>;
|
|
636
643
|
};
|
|
637
644
|
kind: "page";
|
|
@@ -664,10 +671,11 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
664
671
|
|
|
665
672
|
/** @alpha */
|
|
666
673
|
declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"catalog", {
|
|
667
|
-
readonly "deleteEntity.description": "This entity is not referenced by any location and is therefore not receiving updates.
|
|
674
|
+
readonly "deleteEntity.description": "This entity is not referenced by any location and is therefore not receiving updates.";
|
|
668
675
|
readonly "deleteEntity.cancelButtonTitle": "Cancel";
|
|
669
676
|
readonly "deleteEntity.deleteButtonTitle": "Delete";
|
|
670
677
|
readonly "deleteEntity.dialogTitle": "Are you sure you want to delete this entity?";
|
|
678
|
+
readonly "deleteEntity.actionButtonTitle": "Delete entity";
|
|
671
679
|
readonly "indexPage.title": "{{orgName}} Catalog";
|
|
672
680
|
readonly "indexPage.createButtonTitle": "Create";
|
|
673
681
|
readonly "indexPage.supportButtonContent": "All your software catalog entities";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columns.esm.js","sources":["../../../src/components/CatalogTable/columns.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n humanizeEntityRef,\n EntityRefLink,\n EntityRefLinks,\n} from '@backstage/plugin-catalog-react';\nimport Chip from '@material-ui/core/Chip';\nimport { CatalogTableRow } from './types';\nimport { OverflowTooltip, TableColumn } from '@backstage/core-components';\nimport { Entity } from '@backstage/catalog-model';\nimport { JsonArray } from '@backstage/types';\nimport { EntityTableColumnTitle } from '@backstage/plugin-catalog-react/alpha';\n\n// The columnFactories symbol is not directly exported, but through the\n// CatalogTable.columns field.\n/** @public */\nexport const columnFactories = Object.freeze({\n createNameColumn(options?: {\n defaultKind?: string;\n }): TableColumn<CatalogTableRow> {\n function formatContent(entity: Entity): string {\n return (\n entity.metadata?.title ||\n humanizeEntityRef(entity, {\n defaultKind: options?.defaultKind,\n })\n );\n }\n\n return {\n title: <EntityTableColumnTitle translationKey=\"name\" />,\n field: 'resolved.entityRef',\n highlight: true,\n customSort({ entity: entity1 }, { entity: entity2 }) {\n // TODO: We could implement this more efficiently by comparing field by field.\n // This has similar issues as above.\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: ({ entity }) => (\n <EntityRefLink\n entityRef={entity}\n defaultKind={options?.defaultKind || 'Component'}\n />\n ),\n };\n },\n createSystemColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"system\" />,\n field: 'resolved.partOfSystemRelationTitle',\n customFilterAndSearch: (query, row) => {\n if (!row.resolved.partOfSystemRelations) {\n return false;\n }\n\n const systemNames = row.resolved.partOfSystemRelations.map(\n ref => ref.name,\n ); // Extract system names from entityRefs\n\n const searchText = systemNames.join(', ').toLocaleUpperCase('en-US');\n return searchText.includes(query.toLocaleUpperCase('en-US'));\n },\n render: ({ resolved }) => (\n <EntityRefLinks\n entityRefs={resolved.partOfSystemRelations}\n defaultKind=\"system\"\n />\n ),\n };\n },\n createOwnerColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"owner\" />,\n field: 'resolved.ownedByRelationsTitle',\n render: ({ resolved }) => (\n <EntityRefLinks\n entityRefs={resolved.ownedByRelations}\n defaultKind=\"group\"\n />\n ),\n };\n },\n createSpecTargetsColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"targets\" />,\n field: 'entity.spec.targets',\n customFilterAndSearch: (query, row) => {\n let targets: JsonArray = [];\n if (\n row.entity?.spec?.targets &&\n Array.isArray(row.entity?.spec?.targets)\n ) {\n targets = row.entity?.spec?.targets;\n } else if (row.entity?.spec?.target) {\n targets = [row.entity?.spec?.target];\n }\n return targets\n .join(', ')\n .toLocaleUpperCase('en-US')\n .includes(query.toLocaleUpperCase('en-US'));\n },\n render: ({ entity }) => (\n <>\n {(entity?.spec?.targets || entity?.spec?.target) && (\n <OverflowTooltip\n text={(\n (entity!.spec!.targets as JsonArray) || [entity.spec.target]\n ).join(', ')}\n placement=\"bottom-start\"\n />\n )}\n </>\n ),\n };\n },\n createSpecTypeColumn(\n options: {\n hidden: boolean;\n } = { hidden: false },\n ): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"type\" />,\n field: 'entity.spec.type',\n hidden: options.hidden,\n width: 'auto',\n };\n },\n createSpecLifecycleColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"lifecycle\" />,\n field: 'entity.spec.lifecycle',\n };\n },\n createMetadataDescriptionColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"description\" />,\n field: 'entity.metadata.description',\n render: ({ entity }) => (\n <OverflowTooltip\n text={entity.metadata.description}\n placement=\"bottom-start\"\n />\n ),\n width: 'auto',\n };\n },\n createTagsColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"tags\" />,\n field: 'entity.metadata.tags',\n cellStyle: {\n padding: '0px 16px 0px 20px',\n },\n render: ({ entity }) => (\n <>\n {entity.metadata.tags &&\n entity.metadata.tags.map(t => (\n <Chip\n key={t}\n label={t}\n size=\"small\"\n variant=\"outlined\"\n style={{ marginBottom: '0px' }}\n />\n ))}\n </>\n ),\n width: 'auto',\n };\n },\n createTitleColumn(options?: {\n hidden?: boolean;\n }): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"title\" />,\n field: 'entity.metadata.title',\n hidden: options?.hidden,\n searchable: true,\n };\n },\n createLabelColumn(\n key: string,\n options?: { title?: string; defaultValue?: string },\n ): TableColumn<CatalogTableRow> {\n function formatContent(keyLabel: string, entity: Entity): string {\n const labels: Record<string, string> | undefined =\n entity.metadata?.labels;\n return (labels && labels[keyLabel]) || '';\n }\n\n return {\n title: options?.title || (\n <EntityTableColumnTitle translationKey=\"label\" />\n ),\n field: 'entity.metadata.labels',\n cellStyle: {\n padding: '0px 16px 0px 20px',\n },\n customSort({ entity: entity1 }, { entity: entity2 }) {\n return formatContent(key, entity1).localeCompare(\n formatContent(key, entity2),\n );\n },\n render: ({ entity }: { entity: Entity }) => {\n const labels: Record<string, string> | undefined =\n entity.metadata?.labels;\n const specifiedLabelValue =\n (labels && labels[key]) || options?.defaultValue;\n return (\n <>\n {specifiedLabelValue && (\n <Chip\n key={specifiedLabelValue}\n label={specifiedLabelValue}\n size=\"small\"\n variant=\"outlined\"\n />\n )}\n </>\n );\n },\n width: 'auto',\n };\n },\n createNamespaceColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"namespace\" />,\n field: 'entity.metadata.namespace',\n width: 'auto',\n };\n },\n});\n"],"names":[],"mappings":";;;;;;AA8BO,MAAM,eAAA,GAAkB,OAAO,MAAA,CAAO;AAAA,EAC3C,iBAAiB,OAAA,EAEgB;AAC/B,IAAA,SAAS,cAAc,MAAA,EAAwB;AAC7C,MAAA,OACE,MAAA,CAAO,QAAA,EAAU,KAAA,IACjB,iBAAA,CAAkB,MAAA,EAAQ;AAAA,QACxB,aAAa,OAAA,EAAS;AAAA,OACvB,CAAA;AAAA,IAEL;AAEA,IAAA,OAAO;AAAA,MACL,KAAA,kBAAO,GAAA,CAAC,sBAAA,EAAA,EAAuB,cAAA,EAAe,MAAA,EAAO,CAAA;AAAA,MACrD,KAAA,EAAO,oBAAA;AAAA,MACP,SAAA,EAAW,IAAA;AAAA,MACX,UAAA,CAAW,EAAE,MAAA,EAAQ,OAAA,IAAW,EAAE,MAAA,EAAQ,SAAQ,EAAG;AAGnD,QAAA,OAAO,cAAc,OAAO,CAAA,CAAE,aAAA,CAAc,aAAA,CAAc,OAAO,CAAC,CAAA;AAAA,MACpE,CAAA;AAAA,MACA,MAAA,EAAQ,CAAC,EAAE,MAAA,EAAO,qBAChB,GAAA;AA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AA;AAAA,UACjC,aAAA,CAAc,KAAK,OAAO;AAAA,SAC5B;AAAA,MACF,CAAA;AAAA,MACA,MAAA,EAAQ,CAAC,EAAE,MAAA,EAAO,KAA0B;AAC1C,QAAA,MAAM,MAAA,GACJ,OAAO,QAAA,EAAU,MAAA;AACnB,QAAA,MAAM,mBAAA,GACH,MAAA,IAAU,MAAA,CAAO,GAAG,KAAM,OAAA,EAAS,YAAA;AACtC,QAAA,uCAEK,QAAA,EAAA,mBAAA,oBACC,GAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YAEC,KAAA,EAAO,mBAAA;AAAA,YACP,IAAA,EAAK,OAAA;AAAA,YACL,OAAA,EAAQ;AAAA,WAAA;AAAA,UAHH;AAAA,SAIP,EAEJ,CAAA;AAAA,MAEJ,CAAA;AAAA,MACA,KAAA,EAAO;AAAA,KACT;AAAA,EACF,CAAA;AAAA,EACA,qBAAA,GAAsD;AACpD,IAAA,OAAO;AAAA,MACL,KAAA,kBAAO,GAAA,CAAC,sBAAA,EAAA,EAAuB,cAAA,EAAe,WAAA,EAAY,CAAA;AAAA,MAC1D,KAAA,EAAO,2BAAA;AAAA,MACP,KAAA,EAAO;AAAA,KACT;AAAA,EACF;AACF,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"columns.esm.js","sources":["../../../src/components/CatalogTable/columns.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n humanizeEntityRef,\n EntityRefLink,\n EntityRefLinks,\n} from '@backstage/plugin-catalog-react';\nimport Chip from '@material-ui/core/Chip';\nimport { CatalogTableRow } from './types';\nimport { OverflowTooltip, TableColumn } from '@backstage/core-components';\nimport { Entity } from '@backstage/catalog-model';\nimport { JsonArray } from '@backstage/types';\nimport { EntityTableColumnTitle } from '@backstage/plugin-catalog-react/alpha';\n\n// The columnFactories symbol is not directly exported, but through the\n// CatalogTable.columns field.\n/** @public */\nexport const columnFactories = Object.freeze({\n createNameColumn(options?: {\n defaultKind?: string;\n }): TableColumn<CatalogTableRow> {\n function formatContent(entity: Entity): string {\n return (\n entity.metadata?.title ||\n humanizeEntityRef(entity, {\n defaultKind: options?.defaultKind,\n })\n );\n }\n\n return {\n title: <EntityTableColumnTitle translationKey=\"name\" />,\n field: 'resolved.entityRef',\n highlight: true,\n customSort({ entity: entity1 }, { entity: entity2 }) {\n // TODO: We could implement this more efficiently by comparing field by field.\n // This has similar issues as above.\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: ({ entity }) => (\n <EntityRefLink\n entityRef={entity}\n defaultKind={options?.defaultKind || 'Component'}\n />\n ),\n };\n },\n createSystemColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"system\" />,\n field: 'resolved.partOfSystemRelationTitle',\n customFilterAndSearch: (query, row) => {\n if (!row.resolved.partOfSystemRelations) {\n return false;\n }\n\n const systemNames = row.resolved.partOfSystemRelations.map(\n ref => ref.name,\n ); // Extract system names from entityRefs\n\n const searchText = systemNames.join(', ').toLocaleUpperCase('en-US');\n return searchText.includes(query.toLocaleUpperCase('en-US'));\n },\n render: ({ resolved }) => (\n <EntityRefLinks\n entityRefs={resolved.partOfSystemRelations}\n defaultKind=\"system\"\n />\n ),\n };\n },\n createOwnerColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"owner\" />,\n field: 'resolved.ownedByRelationsTitle',\n render: ({ resolved }) => (\n <EntityRefLinks\n entityRefs={resolved.ownedByRelations}\n defaultKind=\"group\"\n />\n ),\n };\n },\n createSpecTargetsColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"targets\" />,\n field: 'entity.spec.targets',\n customFilterAndSearch: (query, row) => {\n let targets: JsonArray = [];\n if (\n row.entity?.spec?.targets &&\n Array.isArray(row.entity?.spec?.targets)\n ) {\n targets = row.entity?.spec?.targets;\n } else if (row.entity?.spec?.target) {\n targets = [row.entity?.spec?.target];\n }\n return targets\n .join(', ')\n .toLocaleUpperCase('en-US')\n .includes(query.toLocaleUpperCase('en-US'));\n },\n render: ({ entity }) => (\n <>\n {(entity?.spec?.targets || entity?.spec?.target) && (\n <OverflowTooltip\n text={(\n (entity!.spec!.targets as JsonArray) || [entity.spec.target]\n ).join(', ')}\n placement=\"bottom-start\"\n />\n )}\n </>\n ),\n };\n },\n createSpecTypeColumn(\n options: {\n hidden: boolean;\n } = { hidden: false },\n ): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"type\" />,\n field: 'entity.spec.type',\n hidden: options.hidden,\n width: 'auto',\n };\n },\n createSpecLifecycleColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"lifecycle\" />,\n field: 'entity.spec.lifecycle',\n };\n },\n createMetadataDescriptionColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"description\" />,\n field: 'entity.metadata.description',\n render: ({ entity }) => (\n <OverflowTooltip\n text={entity.metadata.description}\n placement=\"bottom-start\"\n />\n ),\n width: 'auto',\n };\n },\n createTagsColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"tags\" />,\n field: 'entity.metadata.tags',\n cellStyle: {\n padding: '0px 16px 0px 20px',\n },\n render: ({ entity }) => (\n <>\n {entity.metadata.tags &&\n entity.metadata.tags.map(t => (\n <Chip\n key={t}\n label={t}\n size=\"small\"\n variant=\"outlined\"\n style={{ margin: '2px' }}\n />\n ))}\n </>\n ),\n width: 'auto',\n };\n },\n createTitleColumn(options?: {\n hidden?: boolean;\n }): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"title\" />,\n field: 'entity.metadata.title',\n hidden: options?.hidden,\n searchable: true,\n };\n },\n createLabelColumn(\n key: string,\n options?: { title?: string; defaultValue?: string },\n ): TableColumn<CatalogTableRow> {\n function formatContent(keyLabel: string, entity: Entity): string {\n const labels: Record<string, string> | undefined =\n entity.metadata?.labels;\n return (labels && labels[keyLabel]) || '';\n }\n\n return {\n title: options?.title || (\n <EntityTableColumnTitle translationKey=\"label\" />\n ),\n field: 'entity.metadata.labels',\n cellStyle: {\n padding: '0px 16px 0px 20px',\n },\n customSort({ entity: entity1 }, { entity: entity2 }) {\n return formatContent(key, entity1).localeCompare(\n formatContent(key, entity2),\n );\n },\n render: ({ entity }: { entity: Entity }) => {\n const labels: Record<string, string> | undefined =\n entity.metadata?.labels;\n const specifiedLabelValue =\n (labels && labels[key]) || options?.defaultValue;\n return (\n <>\n {specifiedLabelValue && (\n <Chip\n key={specifiedLabelValue}\n label={specifiedLabelValue}\n size=\"small\"\n variant=\"outlined\"\n />\n )}\n </>\n );\n },\n width: 'auto',\n };\n },\n createNamespaceColumn(): TableColumn<CatalogTableRow> {\n return {\n title: <EntityTableColumnTitle translationKey=\"namespace\" />,\n field: 'entity.metadata.namespace',\n width: 'auto',\n };\n },\n});\n"],"names":[],"mappings":";;;;;;AA8BO,MAAM,eAAA,GAAkB,OAAO,MAAA,CAAO;AAAA,EAC3C,iBAAiB,OAAA,EAEgB;AAC/B,IAAA,SAAS,cAAc,MAAA,EAAwB;AAC7C,MAAA,OACE,MAAA,CAAO,QAAA,EAAU,KAAA,IACjB,iBAAA,CAAkB,MAAA,EAAQ;AAAA,QACxB,aAAa,OAAA,EAAS;AAAA,OACvB,CAAA;AAAA,IAEL;AAEA,IAAA,OAAO;AAAA,MACL,KAAA,kBAAO,GAAA,CAAC,sBAAA,EAAA,EAAuB,cAAA,EAAe,MAAA,EAAO,CAAA;AAAA,MACrD,K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BACd,GAAA,CAAC,sBAAA,EAAA,EAAuB,gBAAe,OAAA,EAAQ,CAAA;AAAA,MAEjD,KAAA,EAAO,wBAAA;AAAA,MACP,SAAA,EAAW;AAAA,QACT,OAAA,EAAS;AAAA,OACX;AAAA,MACA,UAAA,CAAW,EAAE,MAAA,EAAQ,OAAA,IAAW,EAAE,MAAA,EAAQ,SAAQ,EAAG;AACnD,QAAA,OAAO,aAAA,CAAc,GAAA,EAAK,OAAO,CAAA,CAAE,aAAA;AAAA,UACjC,aAAA,CAAc,KAAK,OAAO;AAAA,SAC5B;AAAA,MACF,CAAA;AAAA,MACA,MAAA,EAAQ,CAAC,EAAE,MAAA,EAAO,KAA0B;AAC1C,QAAA,MAAM,MAAA,GACJ,OAAO,QAAA,EAAU,MAAA;AACnB,QAAA,MAAM,mBAAA,GACH,MAAA,IAAU,MAAA,CAAO,GAAG,KAAM,OAAA,EAAS,YAAA;AACtC,QAAA,uCAEK,QAAA,EAAA,mBAAA,oBACC,GAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YAEC,KAAA,EAAO,mBAAA;AAAA,YACP,IAAA,EAAK,OAAA;AAAA,YACL,OAAA,EAAQ;AAAA,WAAA;AAAA,UAHH;AAAA,SAIP,EAEJ,CAAA;AAAA,MAEJ,CAAA;AAAA,MACA,KAAA,EAAO;AAAA,KACT;AAAA,EACF,CAAA;AAAA,EACA,qBAAA,GAAsD;AACpD,IAAA,OAAO;AAAA,MACL,KAAA,kBAAO,GAAA,CAAC,sBAAA,EAAA,EAAuB,cAAA,EAAe,WAAA,EAAY,CAAA;AAAA,MAC1D,KAAA,EAAO,2BAAA;AAAA,MACP,KAAA,EAAO;AAAA,KACT;AAAA,EACF;AACF,CAAC;;;;"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { catalogApiRef } from '@backstage/plugin-catalog-react';
|
|
3
|
-
import Button from '@material-ui/core/Button';
|
|
4
|
-
import Dialog from '@material-ui/core/Dialog';
|
|
5
|
-
import DialogActions from '@material-ui/core/DialogActions';
|
|
6
|
-
import DialogTitle from '@material-ui/core/DialogTitle';
|
|
7
3
|
import { useState } from 'react';
|
|
8
4
|
import { useApi, alertApiRef } from '@backstage/core-plugin-api';
|
|
9
5
|
import { assertError } from '@backstage/errors';
|
|
10
6
|
import { catalogTranslationRef } from '../../alpha/translation.esm.js';
|
|
11
7
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
8
|
+
import { Dialog, DialogHeader, DialogFooter, Button } from '@backstage/ui';
|
|
12
9
|
|
|
13
10
|
function DeleteEntityDialog(props) {
|
|
14
11
|
const { open, onClose, onConfirm, entity } = props;
|
|
@@ -29,20 +26,11 @@ function DeleteEntityDialog(props) {
|
|
|
29
26
|
setBusy(false);
|
|
30
27
|
}
|
|
31
28
|
};
|
|
32
|
-
return /* @__PURE__ */ jsxs(Dialog, { open, onClose, children: [
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
34
|
-
/* @__PURE__ */ jsxs(
|
|
35
|
-
/* @__PURE__ */ jsx(
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
variant: "contained",
|
|
39
|
-
color: "secondary",
|
|
40
|
-
disabled: busy,
|
|
41
|
-
onClick: onDelete,
|
|
42
|
-
children: t("deleteEntity.deleteButtonTitle")
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
/* @__PURE__ */ jsx(Button, { onClick: onClose, color: "primary", children: t("deleteEntity.cancelButtonTitle") })
|
|
29
|
+
return /* @__PURE__ */ jsxs(Dialog, { isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose(), children: [
|
|
30
|
+
/* @__PURE__ */ jsx(DialogHeader, { children: t("deleteEntity.dialogTitle") }),
|
|
31
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
32
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", onPress: onClose, children: t("deleteEntity.cancelButtonTitle") }),
|
|
33
|
+
/* @__PURE__ */ jsx(Button, { variant: "primary", destructive: true, loading: busy, onPress: onDelete, children: t("deleteEntity.deleteButtonTitle") })
|
|
46
34
|
] })
|
|
47
35
|
] });
|
|
48
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteEntityDialog.esm.js","sources":["../../../src/components/EntityOrphanWarning/DeleteEntityDialog.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport
|
|
1
|
+
{"version":3,"file":"DeleteEntityDialog.esm.js","sources":["../../../src/components/EntityOrphanWarning/DeleteEntityDialog.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport { useState } from 'react';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\nimport { assertError } from '@backstage/errors';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { Button, Dialog, DialogFooter, DialogHeader } from '@backstage/ui';\n\ninterface DeleteEntityDialogProps {\n open: boolean;\n onClose: () => any;\n onConfirm: () => any;\n entity: Entity;\n}\n\nexport function DeleteEntityDialog(props: DeleteEntityDialogProps) {\n const { open, onClose, onConfirm, entity } = props;\n const [busy, setBusy] = useState(false);\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const onDelete = async () => {\n setBusy(true);\n try {\n const uid = entity.metadata.uid;\n await catalogApi.removeEntityByUid(uid!);\n onConfirm();\n } catch (err) {\n assertError(err);\n alertApi.post({ message: err.message });\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <Dialog isOpen={open} onOpenChange={isOpen => !isOpen && onClose()}>\n <DialogHeader>{t('deleteEntity.dialogTitle')}</DialogHeader>\n <DialogFooter>\n <Button variant=\"secondary\" onPress={onClose}>\n {t('deleteEntity.cancelButtonTitle')}\n </Button>\n <Button variant=\"primary\" destructive loading={busy} onPress={onDelete}>\n {t('deleteEntity.deleteButtonTitle')}\n </Button>\n </DialogFooter>\n </Dialog>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAgCO,SAAS,mBAAmB,KAAA,EAAgC;AACjE,EAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAS,SAAA,EAAW,QAAO,GAAI,KAAA;AAC7C,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AACtC,EAAA,MAAM,UAAA,GAAa,OAAO,aAAa,CAAA;AACvC,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,WAAW,YAAY;AAC3B,IAAA,OAAA,CAAQ,IAAI,CAAA;AACZ,IAAA,IAAI;AACF,MAAA,MAAM,GAAA,GAAM,OAAO,QAAA,CAAS,GAAA;AAC5B,MAAA,MAAM,UAAA,CAAW,kBAAkB,GAAI,CAAA;AACvC,MAAA,SAAA,EAAU;AAAA,IACZ,SAAS,GAAA,EAAK;AACZ,MAAA,WAAA,CAAY,GAAG,CAAA;AACf,MAAA,QAAA,CAAS,IAAA,CAAK,EAAE,OAAA,EAAS,GAAA,CAAI,SAAS,CAAA;AAAA,IACxC,CAAA,SAAE;AACA,MAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,IACf;AAAA,EACF,CAAA;AAEA,EAAA,uBACE,IAAA,CAAC,UAAO,MAAA,EAAQ,IAAA,EAAM,cAAc,CAAA,MAAA,KAAU,CAAC,MAAA,IAAU,OAAA,EAAQ,EAC/D,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,YAAA,EAAA,EAAc,QAAA,EAAA,CAAA,CAAE,0BAA0B,CAAA,EAAE,CAAA;AAAA,yBAC5C,YAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,UAAO,OAAA,EAAQ,WAAA,EAAY,SAAS,OAAA,EAClC,QAAA,EAAA,CAAA,CAAE,gCAAgC,CAAA,EACrC,CAAA;AAAA,sBACA,GAAA,CAAC,MAAA,EAAA,EAAO,OAAA,EAAQ,SAAA,EAAU,WAAA,EAAW,IAAA,EAAC,OAAA,EAAS,IAAA,EAAM,OAAA,EAAS,QAAA,EAC3D,QAAA,EAAA,CAAA,CAAE,gCAAgC,CAAA,EACrC;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
3
|
-
import Alert from '@material-ui/lab/Alert';
|
|
4
3
|
import { useState } from 'react';
|
|
5
4
|
import { useNavigate } from 'react-router-dom';
|
|
6
5
|
import { DeleteEntityDialog } from './DeleteEntityDialog.esm.js';
|
|
@@ -8,6 +7,7 @@ import { useRouteRef } from '@backstage/core-plugin-api';
|
|
|
8
7
|
import { rootRouteRef } from '../../routes.esm.js';
|
|
9
8
|
import { catalogTranslationRef } from '../../alpha/translation.esm.js';
|
|
10
9
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
10
|
+
import { Alert, Button } from '@backstage/ui';
|
|
11
11
|
|
|
12
12
|
function isOrphan(entity) {
|
|
13
13
|
return entity?.metadata?.annotations?.["backstage.io/orphan"] === "true";
|
|
@@ -23,7 +23,24 @@ function EntityOrphanWarning() {
|
|
|
23
23
|
navigate(catalogLink());
|
|
24
24
|
};
|
|
25
25
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
|
-
/* @__PURE__ */ jsx(
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
Alert,
|
|
28
|
+
{
|
|
29
|
+
status: "warning",
|
|
30
|
+
icon: true,
|
|
31
|
+
title: t("deleteEntity.description"),
|
|
32
|
+
customActions: /* @__PURE__ */ jsx(
|
|
33
|
+
Button,
|
|
34
|
+
{
|
|
35
|
+
size: "small",
|
|
36
|
+
variant: "tertiary",
|
|
37
|
+
destructive: true,
|
|
38
|
+
onPress: () => setConfirmationDialogOpen(true),
|
|
39
|
+
children: t("deleteEntity.actionButtonTitle")
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
),
|
|
27
44
|
/* @__PURE__ */ jsx(
|
|
28
45
|
DeleteEntityDialog,
|
|
29
46
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityOrphanWarning.esm.js","sources":["../../../src/components/EntityOrphanWarning/EntityOrphanWarning.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport
|
|
1
|
+
{"version":3,"file":"EntityOrphanWarning.esm.js","sources":["../../../src/components/EntityOrphanWarning/EntityOrphanWarning.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { DeleteEntityDialog } from './DeleteEntityDialog';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { rootRouteRef } from '../../routes';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { Alert, Button } from '@backstage/ui';\n\n/**\n * Returns true if the given entity has the orphan annotation given by the\n * catalog.\n *\n * @public\n */\nexport function isOrphan(entity: Entity): boolean {\n return entity?.metadata?.annotations?.['backstage.io/orphan'] === 'true';\n}\n\n/**\n * Displays a warning alert if the entity is marked as orphan with the ability\n * to delete said entity.\n *\n * @public\n */\nexport function EntityOrphanWarning() {\n const navigate = useNavigate();\n const catalogLink = useRouteRef(rootRouteRef);\n const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false);\n const { entity } = useEntity();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const cleanUpAfterRemoval = async () => {\n setConfirmationDialogOpen(false);\n navigate(catalogLink());\n };\n\n return (\n <>\n <Alert\n status=\"warning\"\n icon\n title={t('deleteEntity.description')}\n customActions={\n <Button\n size=\"small\"\n variant=\"tertiary\"\n destructive\n onPress={() => setConfirmationDialogOpen(true)}\n >\n {t('deleteEntity.actionButtonTitle')}\n </Button>\n }\n />\n <DeleteEntityDialog\n open={confirmationDialogOpen}\n entity={entity!}\n onConfirm={cleanUpAfterRemoval}\n onClose={() => setConfirmationDialogOpen(false)}\n />\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAiCO,SAAS,SAAS,MAAA,EAAyB;AAChD,EAAA,OAAO,MAAA,EAAQ,QAAA,EAAU,WAAA,GAAc,qBAAqB,CAAA,KAAM,MAAA;AACpE;AAQO,SAAS,mBAAA,GAAsB;AACpC,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,WAAA,GAAc,YAAY,YAAY,CAAA;AAC5C,EAAA,MAAM,CAAC,sBAAA,EAAwB,yBAAyB,CAAA,GAAI,SAAS,KAAK,CAAA;AAC1E,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,sBAAsB,YAAY;AACtC,IAAA,yBAAA,CAA0B,KAAK,CAAA;AAC/B,IAAA,QAAA,CAAS,aAAa,CAAA;AAAA,EACxB,CAAA;AAEA,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,MAAA,EAAO,SAAA;AAAA,QACP,IAAA,EAAI,IAAA;AAAA,QACJ,KAAA,EAAO,EAAE,0BAA0B,CAAA;AAAA,QACnC,aAAA,kBACE,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,IAAA,EAAK,OAAA;AAAA,YACL,OAAA,EAAQ,UAAA;AAAA,YACR,WAAA,EAAW,IAAA;AAAA,YACX,OAAA,EAAS,MAAM,yBAAA,CAA0B,IAAI,CAAA;AAAA,YAE5C,YAAE,gCAAgC;AAAA;AAAA;AACrC;AAAA,KAEJ;AAAA,oBACA,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,sBAAA;AAAA,QACN,MAAA;AAAA,QACA,SAAA,EAAW,mBAAA;AAAA,QACX,OAAA,EAAS,MAAM,yBAAA,CAA0B,KAAK;AAAA;AAAA;AAChD,GAAA,EACF,CAAA;AAEJ;;;;"}
|
package/dist/package.json.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "@backstage/plugin-catalog";
|
|
2
|
-
var version = "1.
|
|
2
|
+
var version = "1.33.0-next.1";
|
|
3
3
|
var description = "The Backstage plugin for browsing the Backstage catalog";
|
|
4
4
|
var backstage = {
|
|
5
5
|
role: "frontend-plugin",
|
|
@@ -74,6 +74,7 @@ var dependencies = {
|
|
|
74
74
|
"@backstage/plugin-techdocs-common": "workspace:^",
|
|
75
75
|
"@backstage/plugin-techdocs-react": "workspace:^",
|
|
76
76
|
"@backstage/types": "workspace:^",
|
|
77
|
+
"@backstage/ui": "workspace:^",
|
|
77
78
|
"@backstage/version-bridge": "workspace:^",
|
|
78
79
|
"@material-ui/core": "^4.12.2",
|
|
79
80
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0-next.1",
|
|
4
4
|
"description": "The Backstage plugin for browsing the Backstage catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -70,24 +70,25 @@
|
|
|
70
70
|
"test": "backstage-cli package test"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@backstage/catalog-client": "
|
|
74
|
-
"@backstage/catalog-model": "
|
|
75
|
-
"@backstage/core-compat-api": "
|
|
76
|
-
"@backstage/core-components": "
|
|
77
|
-
"@backstage/core-plugin-api": "
|
|
78
|
-
"@backstage/errors": "
|
|
79
|
-
"@backstage/frontend-plugin-api": "
|
|
80
|
-
"@backstage/integration-react": "
|
|
81
|
-
"@backstage/plugin-catalog-common": "
|
|
82
|
-
"@backstage/plugin-catalog-react": "
|
|
83
|
-
"@backstage/plugin-permission-react": "
|
|
84
|
-
"@backstage/plugin-scaffolder-common": "
|
|
85
|
-
"@backstage/plugin-search-common": "
|
|
86
|
-
"@backstage/plugin-search-react": "
|
|
87
|
-
"@backstage/plugin-techdocs-common": "
|
|
88
|
-
"@backstage/plugin-techdocs-react": "
|
|
89
|
-
"@backstage/types": "
|
|
90
|
-
"@backstage/
|
|
73
|
+
"@backstage/catalog-client": "1.12.1",
|
|
74
|
+
"@backstage/catalog-model": "1.7.6",
|
|
75
|
+
"@backstage/core-compat-api": "0.5.8-next.1",
|
|
76
|
+
"@backstage/core-components": "0.18.7-next.1",
|
|
77
|
+
"@backstage/core-plugin-api": "1.12.3-next.0",
|
|
78
|
+
"@backstage/errors": "1.2.7",
|
|
79
|
+
"@backstage/frontend-plugin-api": "0.14.0-next.1",
|
|
80
|
+
"@backstage/integration-react": "1.2.15-next.1",
|
|
81
|
+
"@backstage/plugin-catalog-common": "1.1.8-next.0",
|
|
82
|
+
"@backstage/plugin-catalog-react": "1.22.0-next.1",
|
|
83
|
+
"@backstage/plugin-permission-react": "0.4.40-next.0",
|
|
84
|
+
"@backstage/plugin-scaffolder-common": "1.7.6-next.1",
|
|
85
|
+
"@backstage/plugin-search-common": "1.2.22-next.0",
|
|
86
|
+
"@backstage/plugin-search-react": "1.10.3-next.1",
|
|
87
|
+
"@backstage/plugin-techdocs-common": "0.1.1",
|
|
88
|
+
"@backstage/plugin-techdocs-react": "1.3.8-next.0",
|
|
89
|
+
"@backstage/types": "1.2.2",
|
|
90
|
+
"@backstage/ui": "0.12.0-next.1",
|
|
91
|
+
"@backstage/version-bridge": "1.0.11",
|
|
91
92
|
"@material-ui/core": "^4.12.2",
|
|
92
93
|
"@material-ui/icons": "^4.9.1",
|
|
93
94
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -102,12 +103,12 @@
|
|
|
102
103
|
"zen-observable": "^0.10.0"
|
|
103
104
|
},
|
|
104
105
|
"devDependencies": {
|
|
105
|
-
"@backstage/cli": "
|
|
106
|
-
"@backstage/core-app-api": "
|
|
107
|
-
"@backstage/dev-utils": "
|
|
108
|
-
"@backstage/frontend-test-utils": "
|
|
109
|
-
"@backstage/plugin-permission-common": "
|
|
110
|
-
"@backstage/test-utils": "
|
|
106
|
+
"@backstage/cli": "0.35.4-next.1",
|
|
107
|
+
"@backstage/core-app-api": "1.19.5-next.0",
|
|
108
|
+
"@backstage/dev-utils": "1.1.20-next.1",
|
|
109
|
+
"@backstage/frontend-test-utils": "0.4.6-next.1",
|
|
110
|
+
"@backstage/plugin-permission-common": "0.9.6-next.0",
|
|
111
|
+
"@backstage/test-utils": "1.7.15-next.1",
|
|
111
112
|
"@testing-library/dom": "^10.0.0",
|
|
112
113
|
"@testing-library/jest-dom": "^6.0.0",
|
|
113
114
|
"@testing-library/react": "^16.0.0",
|