@backstage/plugin-techdocs 1.17.7-next.0 → 1.17.7
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 +44 -0
- package/dist/alpha.d.ts +45 -1
- package/dist/alpha.esm.js +1 -0
- package/dist/alpha.esm.js.map +1 -1
- package/dist/home/components/DefaultTechDocsHome.esm.js +4 -1
- package/dist/home/components/DefaultTechDocsHome.esm.js.map +1 -1
- package/dist/home/components/Tables/CursorPaginatedDocsTable.esm.js +18 -1
- package/dist/home/components/Tables/CursorPaginatedDocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/DocsTable.esm.js +24 -6
- package/dist/home/components/Tables/DocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/EntityListDocsTable.esm.js +9 -11
- package/dist/home/components/Tables/EntityListDocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/OffsetPaginatedDocsTable.esm.js +18 -1
- package/dist/home/components/Tables/OffsetPaginatedDocsTable.esm.js.map +1 -1
- package/dist/home/components/Tables/actions.esm.js +5 -4
- package/dist/home/components/Tables/actions.esm.js.map +1 -1
- package/dist/home/components/Tables/columns.esm.js +13 -5
- package/dist/home/components/Tables/columns.esm.js.map +1 -1
- package/dist/home/components/TechDocsCustomHome.esm.js +6 -9
- package/dist/home/components/TechDocsCustomHome.esm.js.map +1 -1
- package/dist/home/components/TechDocsPageWrapper.esm.js +6 -2
- package/dist/home/components/TechDocsPageWrapper.esm.js.map +1 -1
- package/dist/index.d.ts +40 -56
- package/dist/plugins/techdocs/package.json.esm.js +1 -1
- package/dist/reader/components/TechDocsBuildLogs.esm.js +8 -4
- package/dist/reader/components/TechDocsBuildLogs.esm.js.map +1 -1
- package/dist/reader/components/TechDocsNotFound.esm.js +5 -2
- package/dist/reader/components/TechDocsNotFound.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.esm.js +12 -3
- package/dist/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.esm.js.map +1 -1
- package/dist/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.esm.js +4 -1
- package/dist/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.esm.js.map +1 -1
- package/dist/reader/components/TechDocsRedirectNotification/TechDocsRedirectNotification.esm.js +4 -1
- package/dist/reader/components/TechDocsRedirectNotification/TechDocsRedirectNotification.esm.js.map +1 -1
- package/dist/reader/components/TechDocsStateIndicator.esm.js +9 -6
- package/dist/reader/components/TechDocsStateIndicator.esm.js.map +1 -1
- package/dist/search/components/TechDocsSearch.esm.js +7 -2
- package/dist/search/components/TechDocsSearch.esm.js.map +1 -1
- package/dist/translation.esm.js +89 -0
- package/dist/translation.esm.js.map +1 -1
- package/package.json +24 -24
package/dist/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsReaderPageSubheader.esm.js","sources":["../../../../src/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MouseEvent, useState, useCallback } from 'react';\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport IconButton from '@material-ui/core/IconButton';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport { ToolbarProps } from '@material-ui/core/Toolbar';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Menu from '@material-ui/core/Menu';\nimport Box from '@material-ui/core/Box';\nimport SettingsIcon from '@material-ui/icons/Settings';\n\nimport {\n TechDocsAddonLocations as locations,\n useTechDocsAddons,\n useTechDocsReaderPage,\n} from '@backstage/plugin-techdocs-react';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n gridArea: 'pageSubheader',\n flexDirection: 'column',\n minHeight: 'auto',\n padding: theme.spacing(3, 3, 0),\n '@media print': {\n display: 'none',\n },\n },\n}));\n\n/**\n * Renders the reader page subheader.\n * Please use the Tech Docs add-ons to customize it\n * @public\n */\nexport const TechDocsReaderPageSubheader = (props: {\n toolbarProps?: ToolbarProps;\n}) => {\n const classes = useStyles();\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const handleClick = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const handleClose = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const {\n entityMetadata: { value: entityMetadata, loading: entityMetadataLoading },\n } = useTechDocsReaderPage();\n\n const addons = useTechDocsAddons();\n\n const subheaderAddons = addons.renderComponentsByLocation(\n locations.Subheader,\n );\n\n const settingsAddons = addons.renderComponentsByLocation(locations.Settings);\n\n if (!subheaderAddons && !settingsAddons) return null;\n\n // No entity metadata = 404. Don't render subheader on 404.\n if (entityMetadataLoading === false && !entityMetadata) return null;\n\n return (\n <Toolbar classes={classes} {...props.toolbarProps}>\n <Box\n display=\"flex\"\n justifyContent=\"flex-end\"\n width=\"100%\"\n flexWrap=\"wrap\"\n >\n {subheaderAddons}\n {settingsAddons ? (\n <>\n <Tooltip title
|
|
1
|
+
{"version":3,"file":"TechDocsReaderPageSubheader.esm.js","sources":["../../../../src/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MouseEvent, useState, useCallback } from 'react';\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport IconButton from '@material-ui/core/IconButton';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport { ToolbarProps } from '@material-ui/core/Toolbar';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport Menu from '@material-ui/core/Menu';\nimport Box from '@material-ui/core/Box';\nimport SettingsIcon from '@material-ui/icons/Settings';\n\nimport {\n TechDocsAddonLocations as locations,\n useTechDocsAddons,\n useTechDocsReaderPage,\n} from '@backstage/plugin-techdocs-react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { techdocsTranslationRef } from '../../../translation';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n gridArea: 'pageSubheader',\n flexDirection: 'column',\n minHeight: 'auto',\n padding: theme.spacing(3, 3, 0),\n '@media print': {\n display: 'none',\n },\n },\n}));\n\n/**\n * Renders the reader page subheader.\n * Please use the Tech Docs add-ons to customize it\n * @public\n */\nexport const TechDocsReaderPageSubheader = (props: {\n toolbarProps?: ToolbarProps;\n}) => {\n const classes = useStyles();\n const { t } = useTranslationRef(techdocsTranslationRef);\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const handleClick = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const handleClose = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const {\n entityMetadata: { value: entityMetadata, loading: entityMetadataLoading },\n } = useTechDocsReaderPage();\n\n const addons = useTechDocsAddons();\n\n const subheaderAddons = addons.renderComponentsByLocation(\n locations.Subheader,\n );\n\n const settingsAddons = addons.renderComponentsByLocation(locations.Settings);\n\n if (!subheaderAddons && !settingsAddons) return null;\n\n // No entity metadata = 404. Don't render subheader on 404.\n if (entityMetadataLoading === false && !entityMetadata) return null;\n\n return (\n <Toolbar classes={classes} {...props.toolbarProps}>\n <Box\n display=\"flex\"\n justifyContent=\"flex-end\"\n width=\"100%\"\n flexWrap=\"wrap\"\n >\n {subheaderAddons}\n {settingsAddons ? (\n <>\n <Tooltip title={t('reader.settings')}>\n <IconButton\n aria-controls=\"tech-docs-reader-page-settings\"\n aria-haspopup=\"true\"\n onClick={handleClick}\n >\n <SettingsIcon />\n </IconButton>\n </Tooltip>\n <Menu\n id=\"tech-docs-reader-page-settings\"\n getContentAnchorEl={null}\n anchorEl={anchorEl}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n open={Boolean(anchorEl)}\n onClose={handleClose}\n keepMounted\n >\n <div>{settingsAddons}</div>\n </Menu>\n </>\n ) : null}\n </Box>\n </Toolbar>\n );\n};\n"],"names":["locations"],"mappings":";;;;;;;;;;;;;AAmCA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,IAAA,EAAM;AAAA,IACJ,QAAA,EAAU,eAAA;AAAA,IACV,aAAA,EAAe,QAAA;AAAA,IACf,SAAA,EAAW,MAAA;AAAA,IACX,OAAA,EAAS,KAAA,CAAM,OAAA,CAAQ,CAAA,EAAG,GAAG,CAAC,CAAA;AAAA,IAC9B,cAAA,EAAgB;AAAA,MACd,OAAA,EAAS;AAAA;AACX;AAEJ,CAAA,CAAE,CAAA;AAOK,MAAM,2BAAA,GAA8B,CAAC,KAAA,KAEtC;AACJ,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,sBAAsB,CAAA;AACtD,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAA6B,IAAI,CAAA;AAEjE,EAAA,MAAM,WAAA,GAAc,WAAA,CAAY,CAAC,KAAA,KAAyC;AACxE,IAAA,WAAA,CAAY,MAAM,aAAa,CAAA;AAAA,EACjC,CAAA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A,WAChB,EACF,CAAA;AAAA,0BACA,GAAA;AAAA,YAAC,IAAA;AAAA,YAAA;AAAA,cACC,EAAA,EAAG,gCAAA;AAAA,cACH,kBAAA,EAAoB,IAAA;AAAA,cACpB,QAAA;AAAA,cACA,YAAA,EAAc,EAAE,QAAA,EAAU,QAAA,EAAU,YAAY,OAAA,EAAQ;AAAA,cACxD,IAAA,EAAM,QAAQ,QAAQ,CAAA;AAAA,cACtB,OAAA,EAAS,WAAA;AAAA,cACT,WAAA,EAAW,IAAA;AAAA,cAEX,QAAA,kBAAA,GAAA,CAAC,SAAK,QAAA,EAAA,cAAA,EAAe;AAAA;AAAA;AACvB,SAAA,EACF,CAAA,GACE;AAAA;AAAA;AAAA,GACN,EACF,CAAA;AAEJ;;;;"}
|
package/dist/reader/components/TechDocsRedirectNotification/TechDocsRedirectNotification.esm.js
CHANGED
|
@@ -3,6 +3,8 @@ import { makeStyles } from '@material-ui/core/styles';
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import Snackbar from '@material-ui/core/Snackbar';
|
|
5
5
|
import Button from '@material-ui/core/Button';
|
|
6
|
+
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
7
|
+
import { techdocsTranslationRef } from '../../../translation.esm.js';
|
|
6
8
|
|
|
7
9
|
const useStyles = makeStyles((theme) => ({
|
|
8
10
|
button: {
|
|
@@ -17,6 +19,7 @@ const TechDocsRedirectNotification = ({
|
|
|
17
19
|
}) => {
|
|
18
20
|
const classes = useStyles();
|
|
19
21
|
const [open, setOpen] = useState(true);
|
|
22
|
+
const { t } = useTranslationRef(techdocsTranslationRef);
|
|
20
23
|
const handleClose = () => setOpen(false);
|
|
21
24
|
return /* @__PURE__ */ jsx(
|
|
22
25
|
Snackbar,
|
|
@@ -36,7 +39,7 @@ const TechDocsRedirectNotification = ({
|
|
|
36
39
|
handleClose();
|
|
37
40
|
handleButtonClick();
|
|
38
41
|
},
|
|
39
|
-
children: "
|
|
42
|
+
children: t("redirectNotification.redirectNow")
|
|
40
43
|
}
|
|
41
44
|
)
|
|
42
45
|
}
|
package/dist/reader/components/TechDocsRedirectNotification/TechDocsRedirectNotification.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsRedirectNotification.esm.js","sources":["../../../../src/reader/components/TechDocsRedirectNotification/TechDocsRedirectNotification.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useState } from 'react';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport Button from '@material-ui/core/Button';\n\ntype TechDocsRedirectNotificationProps = {\n handleButtonClick: () => void;\n message: string;\n autoHideDuration: number;\n};\n\nconst useStyles = makeStyles(theme => ({\n button: {\n color: theme.palette.primary.light,\n textDecoration: 'underline',\n },\n}));\n\nexport const TechDocsRedirectNotification = ({\n message,\n handleButtonClick,\n autoHideDuration,\n}: TechDocsRedirectNotificationProps) => {\n const classes = useStyles();\n const [open, setOpen] = useState(true);\n\n const handleClose = () => setOpen(false);\n\n return (\n <Snackbar\n open={open}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n autoHideDuration={autoHideDuration}\n color=\"primary\"\n onClose={handleClose}\n message={message}\n action={\n <Button\n classes={{ root: classes.button }}\n size=\"small\"\n onClick={() => {\n handleClose();\n handleButtonClick();\n }}\n >\n
|
|
1
|
+
{"version":3,"file":"TechDocsRedirectNotification.esm.js","sources":["../../../../src/reader/components/TechDocsRedirectNotification/TechDocsRedirectNotification.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useState } from 'react';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport Button from '@material-ui/core/Button';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { techdocsTranslationRef } from '../../../translation';\n\ntype TechDocsRedirectNotificationProps = {\n handleButtonClick: () => void;\n message: string;\n autoHideDuration: number;\n};\n\nconst useStyles = makeStyles(theme => ({\n button: {\n color: theme.palette.primary.light,\n textDecoration: 'underline',\n },\n}));\n\nexport const TechDocsRedirectNotification = ({\n message,\n handleButtonClick,\n autoHideDuration,\n}: TechDocsRedirectNotificationProps) => {\n const classes = useStyles();\n const [open, setOpen] = useState(true);\n const { t } = useTranslationRef(techdocsTranslationRef);\n\n const handleClose = () => setOpen(false);\n\n return (\n <Snackbar\n open={open}\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n autoHideDuration={autoHideDuration}\n color=\"primary\"\n onClose={handleClose}\n message={message}\n action={\n <Button\n classes={{ root: classes.button }}\n size=\"small\"\n onClick={() => {\n handleClose();\n handleButtonClick();\n }}\n >\n {t('redirectNotification.redirectNow')}\n </Button>\n }\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA6BA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,OAAA,CAAQ,KAAA;AAAA,IAC7B,cAAA,EAAgB;AAAA;AAEpB,CAAA,CAAE,CAAA;AAEK,MAAM,+BAA+B,CAAC;AAAA,EAC3C,OAAA;AAAA,EACA,iBAAA;AAAA,EACA;AACF,CAAA,KAAyC;AACvC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,IAAI,CAAA;AACrC,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,sBAAsB,CAAA;AAEtD,EAAA,MAAM,WAAA,GAAc,MAAM,OAAA,CAAQ,KAAK,CAAA;AAEvC,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,YAAA,EAAc,EAAE,QAAA,EAAU,KAAA,EAAO,YAAY,OAAA,EAAQ;AAAA,MACrD,gBAAA;AAAA,MACA,KAAA,EAAM,SAAA;AAAA,MACN,OAAA,EAAS,WAAA;AAAA,MACT,OAAA;AAAA,MACA,MAAA,kBACE,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAS,EAAE,IAAA,EAAM,OAAA,CAAQ,MAAA,EAAO;AAAA,UAChC,IAAA,EAAK,OAAA;AAAA,UACL,SAAS,MAAM;AACb,YAAA,WAAA,EAAY;AACZ,YAAA,iBAAA,EAAkB;AAAA,UACpB,CAAA;AAAA,UAEC,YAAE,kCAAkC;AAAA;AAAA;AACvC;AAAA,GAEJ;AAEJ;;;;"}
|
|
@@ -3,9 +3,11 @@ import CircularProgress from '@material-ui/core/CircularProgress';
|
|
|
3
3
|
import Button from '@material-ui/core/Button';
|
|
4
4
|
import { makeStyles } from '@material-ui/core/styles';
|
|
5
5
|
import Alert from '@material-ui/lab/Alert';
|
|
6
|
+
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
6
7
|
import { TechDocsBuildLogs } from './TechDocsBuildLogs.esm.js';
|
|
7
8
|
import { TechDocsNotFound } from './TechDocsNotFound.esm.js';
|
|
8
9
|
import { useTechDocsReader } from './TechDocsReaderProvider.esm.js';
|
|
10
|
+
import { techdocsTranslationRef } from '../../translation.esm.js';
|
|
9
11
|
|
|
10
12
|
const useStyles = makeStyles((theme) => ({
|
|
11
13
|
root: {
|
|
@@ -21,6 +23,7 @@ const useStyles = makeStyles((theme) => ({
|
|
|
21
23
|
const TechDocsStateIndicator = () => {
|
|
22
24
|
let StateAlert = null;
|
|
23
25
|
const classes = useStyles();
|
|
26
|
+
const { t } = useTranslationRef(techdocsTranslationRef);
|
|
24
27
|
const {
|
|
25
28
|
state,
|
|
26
29
|
contentReload,
|
|
@@ -37,7 +40,7 @@ const TechDocsStateIndicator = () => {
|
|
|
37
40
|
severity: "info",
|
|
38
41
|
icon: /* @__PURE__ */ jsx(CircularProgress, { size: "24px" }),
|
|
39
42
|
action: /* @__PURE__ */ jsx(TechDocsBuildLogs, { buildLog }),
|
|
40
|
-
children: "
|
|
43
|
+
children: t("stateIndicator.initialBuild.message")
|
|
41
44
|
}
|
|
42
45
|
);
|
|
43
46
|
}
|
|
@@ -50,7 +53,7 @@ const TechDocsStateIndicator = () => {
|
|
|
50
53
|
icon: /* @__PURE__ */ jsx(CircularProgress, { size: "24px" }),
|
|
51
54
|
action: /* @__PURE__ */ jsx(TechDocsBuildLogs, { buildLog }),
|
|
52
55
|
classes: { root: classes.root },
|
|
53
|
-
children: "
|
|
56
|
+
children: t("stateIndicator.contentStaleRefreshing.message")
|
|
54
57
|
}
|
|
55
58
|
);
|
|
56
59
|
}
|
|
@@ -60,9 +63,9 @@ const TechDocsStateIndicator = () => {
|
|
|
60
63
|
{
|
|
61
64
|
variant: "outlined",
|
|
62
65
|
severity: "success",
|
|
63
|
-
action: /* @__PURE__ */ jsx(Button, { color: "inherit", onClick: () => contentReload(), children: "
|
|
66
|
+
action: /* @__PURE__ */ jsx(Button, { color: "inherit", onClick: () => contentReload(), children: t("stateIndicator.contentStaleReady.refreshButton") }),
|
|
64
67
|
classes: { root: classes.root },
|
|
65
|
-
children: "
|
|
68
|
+
children: t("stateIndicator.contentStaleReady.message")
|
|
66
69
|
}
|
|
67
70
|
);
|
|
68
71
|
}
|
|
@@ -75,7 +78,7 @@ const TechDocsStateIndicator = () => {
|
|
|
75
78
|
action: /* @__PURE__ */ jsx(TechDocsBuildLogs, { buildLog }),
|
|
76
79
|
classes: { root: classes.root, message: classes.message },
|
|
77
80
|
children: [
|
|
78
|
-
"
|
|
81
|
+
t("stateIndicator.contentStaleError.message"),
|
|
79
82
|
" ",
|
|
80
83
|
syncErrorMessage
|
|
81
84
|
]
|
|
@@ -92,7 +95,7 @@ const TechDocsStateIndicator = () => {
|
|
|
92
95
|
action: /* @__PURE__ */ jsx(TechDocsBuildLogs, { buildLog }),
|
|
93
96
|
classes: { root: classes.root, message: classes.message },
|
|
94
97
|
children: [
|
|
95
|
-
"
|
|
98
|
+
t("stateIndicator.contentStaleError.message"),
|
|
96
99
|
" ",
|
|
97
100
|
syncErrorMessage
|
|
98
101
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsStateIndicator.esm.js","sources":["../../../src/reader/components/TechDocsStateIndicator.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 CircularProgress from '@material-ui/core/CircularProgress';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Alert from '@material-ui/lab/Alert';\n\nimport { TechDocsBuildLogs } from './TechDocsBuildLogs';\nimport { TechDocsNotFound } from './TechDocsNotFound';\nimport { useTechDocsReader } from './TechDocsReaderProvider';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginBottom: theme.spacing(2),\n },\n message: {\n // `word-break: break-word` is deprecated, but gives legacy support to browsers not supporting `overflow-wrap` yet\n // https://developer.mozilla.org/en-US/docs/Web/CSS/word-break\n wordBreak: 'break-word',\n overflowWrap: 'anywhere',\n },\n}));\n\nexport const TechDocsStateIndicator = () => {\n let StateAlert: JSX.Element | null = null;\n const classes = useStyles();\n\n const {\n state,\n contentReload,\n contentErrorMessage,\n syncErrorMessage,\n buildLog,\n } = useTechDocsReader();\n\n if (state === 'INITIAL_BUILD') {\n StateAlert = (\n <Alert\n classes={{ root: classes.root }}\n variant=\"outlined\"\n severity=\"info\"\n icon={<CircularProgress size=\"24px\" />}\n action={<TechDocsBuildLogs buildLog={buildLog} />}\n >\n
|
|
1
|
+
{"version":3,"file":"TechDocsStateIndicator.esm.js","sources":["../../../src/reader/components/TechDocsStateIndicator.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 CircularProgress from '@material-ui/core/CircularProgress';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Alert from '@material-ui/lab/Alert';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nimport { TechDocsBuildLogs } from './TechDocsBuildLogs';\nimport { TechDocsNotFound } from './TechDocsNotFound';\nimport { useTechDocsReader } from './TechDocsReaderProvider';\nimport { techdocsTranslationRef } from '../../translation';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginBottom: theme.spacing(2),\n },\n message: {\n // `word-break: break-word` is deprecated, but gives legacy support to browsers not supporting `overflow-wrap` yet\n // https://developer.mozilla.org/en-US/docs/Web/CSS/word-break\n wordBreak: 'break-word',\n overflowWrap: 'anywhere',\n },\n}));\n\nexport const TechDocsStateIndicator = () => {\n let StateAlert: JSX.Element | null = null;\n const classes = useStyles();\n const { t } = useTranslationRef(techdocsTranslationRef);\n\n const {\n state,\n contentReload,\n contentErrorMessage,\n syncErrorMessage,\n buildLog,\n } = useTechDocsReader();\n\n if (state === 'INITIAL_BUILD') {\n StateAlert = (\n <Alert\n classes={{ root: classes.root }}\n variant=\"outlined\"\n severity=\"info\"\n icon={<CircularProgress size=\"24px\" />}\n action={<TechDocsBuildLogs buildLog={buildLog} />}\n >\n {t('stateIndicator.initialBuild.message')}\n </Alert>\n );\n }\n\n if (state === 'CONTENT_STALE_REFRESHING') {\n StateAlert = (\n <Alert\n variant=\"outlined\"\n severity=\"info\"\n icon={<CircularProgress size=\"24px\" />}\n action={<TechDocsBuildLogs buildLog={buildLog} />}\n classes={{ root: classes.root }}\n >\n {t('stateIndicator.contentStaleRefreshing.message')}\n </Alert>\n );\n }\n\n if (state === 'CONTENT_STALE_READY') {\n StateAlert = (\n <Alert\n variant=\"outlined\"\n severity=\"success\"\n action={\n <Button color=\"inherit\" onClick={() => contentReload()}>\n {t('stateIndicator.contentStaleReady.refreshButton')}\n </Button>\n }\n classes={{ root: classes.root }}\n >\n {t('stateIndicator.contentStaleReady.message')}\n </Alert>\n );\n }\n\n if (state === 'CONTENT_STALE_ERROR') {\n StateAlert = (\n <Alert\n variant=\"outlined\"\n severity=\"error\"\n action={<TechDocsBuildLogs buildLog={buildLog} />}\n classes={{ root: classes.root, message: classes.message }}\n >\n {t('stateIndicator.contentStaleError.message')} {syncErrorMessage}\n </Alert>\n );\n }\n\n if (state === 'CONTENT_NOT_FOUND') {\n StateAlert = (\n <>\n {syncErrorMessage && (\n <Alert\n variant=\"outlined\"\n severity=\"error\"\n action={<TechDocsBuildLogs buildLog={buildLog} />}\n classes={{ root: classes.root, message: classes.message }}\n >\n {t('stateIndicator.contentStaleError.message')} {syncErrorMessage}\n </Alert>\n )}\n <TechDocsNotFound errorMessage={contentErrorMessage} />\n </>\n );\n }\n\n return StateAlert;\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA2BA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,IAAA,EAAM;AAAA,IACJ,YAAA,EAAc,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,GAC/B;AAAA,EACA,OAAA,EAAS;AAAA;AAAA;AAAA,IAGP,SAAA,EAAW,YAAA;AAAA,IACX,YAAA,EAAc;AAAA;AAElB,CAAA,CAAE,CAAA;AAEK,MAAM,yBAAyB,MAAM;AAC1C,EAAA,IAAI,UAAA,GAAiC,IAAA;AACrC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,sBAAsB,CAAA;AAEtD,EAAA,MAAM;AAAA,IACJ,KAAA;AAAA,IACA,aAAA;AAAA,IACA,mBAAA;AAAA,IACA,gBAAA;AAAA,IACA;AAAA,MACE,iBAAA,EAAkB;AAEtB,EAAA,IAAI,UAAU,eAAA,EAAiB;AAC7B,IAAA,UAAA,mBACE,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAS,EAAE,IAAA,EAAM,OAAA,CAAQ,IAAA,EAAK;AAAA,QAC9B,OAAA,EAAQ,UAAA;AAAA,QACR,QAAA,EAAS,MAAA;AAAA,QACT,IAAA,kBAAM,GAAA,CAAC,gBAAA,EAAA,EAAiB,IAAA,EAAK,MAAA,EAAO,CAAA;AAAA,QACpC,MAAA,kBAAQ,GAAA,CAAC,iBAAA,EAAA,EAAkB,QAAA,EAAoB,CAAA;AAAA,QAE9C,YAAE,qCAAqC;AAAA;AAAA,KAC1C;AAAA,EAEJ;AAEA,EAAA,IAAI,UAAU,0BAAA,EAA4B;AACxC,IAAA,UAAA,mBACE,GAAA;AAAA,MAAC,KAAA;A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A;AAAA;AAAA,KACnD;AAAA,EAEJ;AAEA,EAAA,IAAI,UAAU,mBAAA,EAAqB;AACjC,IAAA,UAAA,mBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,MAAA,gBAAA,oBACC,IAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,UAAA;AAAA,UACR,QAAA,EAAS,OAAA;AAAA,UACT,MAAA,kBAAQ,GAAA,CAAC,iBAAA,EAAA,EAAkB,QAAA,EAAoB,CAAA;AAAA,UAC/C,SAAS,EAAE,IAAA,EAAM,QAAQ,IAAA,EAAM,OAAA,EAAS,QAAQ,OAAA,EAAQ;AAAA,UAEvD,QAAA,EAAA;AAAA,YAAA,CAAA,CAAE,0CAA0C,CAAA;AAAA,YAAE,GAAA;AAAA,YAAE;AAAA;AAAA;AAAA,OACnD;AAAA,sBAEF,GAAA,CAAC,gBAAA,EAAA,EAAiB,YAAA,EAAc,mBAAA,EAAqB;AAAA,KAAA,EACvD,CAAA;AAAA,EAEJ;AAEA,EAAA,OAAO,UAAA;AACT;;;;"}
|
|
@@ -2,6 +2,8 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { SearchContextProvider, SearchAutocomplete } from '@backstage/plugin-search-react';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { useNavigate } from 'react-router-dom';
|
|
5
|
+
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
6
|
+
import { techdocsTranslationRef } from '../../translation.esm.js';
|
|
5
7
|
import { TechDocsSearchResultListItem } from './TechDocsSearchResultListItem.esm.js';
|
|
6
8
|
import { useTechDocsSearch } from '../../hooks/useTechDocsSearch.esm.js';
|
|
7
9
|
|
|
@@ -17,6 +19,7 @@ const TechDocsSearchBar = (props) => {
|
|
|
17
19
|
} = props;
|
|
18
20
|
const [open, setOpen] = useState(false);
|
|
19
21
|
const navigate = useNavigate();
|
|
22
|
+
const { t } = useTranslationRef(techdocsTranslationRef);
|
|
20
23
|
const { results, term, loading } = useTechDocsSearch(entityId);
|
|
21
24
|
const handleSelection = (_, selection) => {
|
|
22
25
|
if (isTechDocsSearchResult(selection)) {
|
|
@@ -44,7 +47,7 @@ const TechDocsSearchBar = (props) => {
|
|
|
44
47
|
},
|
|
45
48
|
onChange: handleSelection,
|
|
46
49
|
blurOnSelect: true,
|
|
47
|
-
noOptionsText: "
|
|
50
|
+
noOptionsText: t("search.noResults"),
|
|
48
51
|
value: null,
|
|
49
52
|
options: results,
|
|
50
53
|
renderOption: ({ document, highlight }) => /* @__PURE__ */ jsx(
|
|
@@ -60,7 +63,9 @@ const TechDocsSearchBar = (props) => {
|
|
|
60
63
|
),
|
|
61
64
|
loading,
|
|
62
65
|
inputDebounceTime: debounceTime,
|
|
63
|
-
inputPlaceholder:
|
|
66
|
+
inputPlaceholder: t("search.placeholder", {
|
|
67
|
+
entityTitle: entityTitle || entityId.name
|
|
68
|
+
}),
|
|
64
69
|
freeSolo: false
|
|
65
70
|
}
|
|
66
71
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsSearch.esm.js","sources":["../../../src/search/components/TechDocsSearch.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 { CompoundEntityRef } from '@backstage/catalog-model';\nimport {\n SearchAutocomplete,\n SearchContextProvider,\n} from '@backstage/plugin-search-react';\nimport { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { TechDocsSearchResultListItem } from './TechDocsSearchResultListItem';\nimport {\n useTechDocsSearch,\n TechDocsSearchResult,\n} from '../../hooks/useTechDocsSearch';\n\n/**\n * Props for {@link TechDocsSearch}\n *\n * @public\n */\nexport type TechDocsSearchProps = {\n entityId: CompoundEntityRef;\n entityTitle?: string;\n debounceTime?: number;\n searchResultUrlMapper?: (url: string) => string;\n};\n\nconst isTechDocsSearchResult = (\n option: any,\n): option is TechDocsSearchResult => {\n return option?.document;\n};\n\nconst TechDocsSearchBar = (props: TechDocsSearchProps) => {\n const {\n entityId,\n entityTitle,\n debounceTime = 150,\n searchResultUrlMapper,\n } = props;\n const [open, setOpen] = useState(false);\n const navigate = useNavigate();\n const { results, term, loading } = useTechDocsSearch(entityId);\n\n const handleSelection = (\n _: any,\n selection: TechDocsSearchResult | string | null,\n ) => {\n if (isTechDocsSearchResult(selection)) {\n const { location } = selection.document;\n navigate(\n searchResultUrlMapper ? searchResultUrlMapper(location) : location,\n );\n }\n };\n\n return (\n <SearchAutocomplete\n data-testid=\"techdocs-search-bar\"\n size=\"small\"\n open={open && Boolean(term)}\n getOptionLabel={() => ''}\n filterOptions={x => {\n return x; // This is needed to get renderOption to be called after options change. Bug in material-ui?\n }}\n onClose={() => {\n setOpen(false);\n }}\n onOpen={() => {\n setOpen(true);\n }}\n onChange={handleSelection}\n blurOnSelect\n noOptionsText
|
|
1
|
+
{"version":3,"file":"TechDocsSearch.esm.js","sources":["../../../src/search/components/TechDocsSearch.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 { CompoundEntityRef } from '@backstage/catalog-model';\nimport {\n SearchAutocomplete,\n SearchContextProvider,\n} from '@backstage/plugin-search-react';\nimport { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { techdocsTranslationRef } from '../../translation';\nimport { TechDocsSearchResultListItem } from './TechDocsSearchResultListItem';\nimport {\n useTechDocsSearch,\n TechDocsSearchResult,\n} from '../../hooks/useTechDocsSearch';\n\n/**\n * Props for {@link TechDocsSearch}\n *\n * @public\n */\nexport type TechDocsSearchProps = {\n entityId: CompoundEntityRef;\n entityTitle?: string;\n debounceTime?: number;\n searchResultUrlMapper?: (url: string) => string;\n};\n\nconst isTechDocsSearchResult = (\n option: any,\n): option is TechDocsSearchResult => {\n return option?.document;\n};\n\nconst TechDocsSearchBar = (props: TechDocsSearchProps) => {\n const {\n entityId,\n entityTitle,\n debounceTime = 150,\n searchResultUrlMapper,\n } = props;\n const [open, setOpen] = useState(false);\n const navigate = useNavigate();\n const { t } = useTranslationRef(techdocsTranslationRef);\n const { results, term, loading } = useTechDocsSearch(entityId);\n\n const handleSelection = (\n _: any,\n selection: TechDocsSearchResult | string | null,\n ) => {\n if (isTechDocsSearchResult(selection)) {\n const { location } = selection.document;\n navigate(\n searchResultUrlMapper ? searchResultUrlMapper(location) : location,\n );\n }\n };\n\n return (\n <SearchAutocomplete\n data-testid=\"techdocs-search-bar\"\n size=\"small\"\n open={open && Boolean(term)}\n getOptionLabel={() => ''}\n filterOptions={x => {\n return x; // This is needed to get renderOption to be called after options change. Bug in material-ui?\n }}\n onClose={() => {\n setOpen(false);\n }}\n onOpen={() => {\n setOpen(true);\n }}\n onChange={handleSelection}\n blurOnSelect\n noOptionsText={t('search.noResults')}\n value={null}\n options={results}\n renderOption={({ document, highlight }) => (\n <TechDocsSearchResultListItem\n result={document}\n lineClamp={3}\n asListItem={false}\n asLink={false}\n title={document.title}\n highlight={highlight}\n />\n )}\n loading={loading}\n inputDebounceTime={debounceTime}\n inputPlaceholder={t('search.placeholder', {\n entityTitle: entityTitle || entityId.name,\n })}\n freeSolo={false}\n />\n );\n};\n\n/**\n * Component used to render search bar on TechDocs page, scoped to\n *\n * @public\n */\nexport const TechDocsSearch = (props: TechDocsSearchProps) => {\n const initialState = {\n term: '',\n types: ['techdocs'],\n pageCursor: '',\n filters: props.entityId,\n };\n return (\n <SearchContextProvider initialState={initialState}>\n <TechDocsSearchBar {...props} />\n </SearchContextProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA2CA,MAAM,sBAAA,GAAyB,CAC7B,MAAA,KACmC;AACnC,EAAA,OAAO,MAAA,EAAQ,QAAA;AACjB,CAAA;AAEA,MAAM,iBAAA,GAAoB,CAAC,KAAA,KAA+B;AACxD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA,GAAe,GAAA;AAAA,IACf;AAAA,GACF,GAAI,KAAA;AACJ,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AACtC,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,sBAAsB,CAAA;AACtD,EAAA,MAAM,EAAE,OAAA,EAAS,IAAA,EAAM,OAAA,EAAQ,GAAI,kBAAkB,QAAQ,CAAA;AAE7D,EAAA,MAAM,eAAA,GAAkB,CACtB,CAAA,EACA,SAAA,KACG;AACH,IAAA,IAAI,sBAAA,CAAuB,SAAS,CAAA,EAAG;AACrC,MAAA,MAAM,EAAE,QAAA,EAAS,GAAI,SAAA,CAAU,QAAA;AAC/B,MAAA,QAAA;AAAA,QACE,qBAAA,GAAwB,qBAAA,CAAsB,QAAQ,CAAA,GAAI;AAAA,OAC5D;AAAA,IACF;AAAA,EACF,CAAA;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAY,qBAAA;AAAA,MACZ,IAAA,EAAK,OAAA;AAAA,MACL,IAAA,EAAM,IAAA,IAAQ,OA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mB,GAAG,OAAO,CAAA,EAChC,CAAA;AAEJ;;;;"}
|
package/dist/translation.esm.js
CHANGED
|
@@ -5,6 +5,95 @@ const techdocsTranslationRef = createTranslationRef({
|
|
|
5
5
|
messages: {
|
|
6
6
|
aboutCard: {
|
|
7
7
|
viewTechdocs: "View TechDocs"
|
|
8
|
+
},
|
|
9
|
+
notFound: {
|
|
10
|
+
title: "Documentation not found",
|
|
11
|
+
builderNote: "Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."
|
|
12
|
+
},
|
|
13
|
+
buildLogs: {
|
|
14
|
+
title: "Build Details",
|
|
15
|
+
closeDrawer: "Close the drawer",
|
|
16
|
+
showBuildLogs: "Show Build Logs",
|
|
17
|
+
waitingForLogs: "Waiting for logs..."
|
|
18
|
+
},
|
|
19
|
+
stateIndicator: {
|
|
20
|
+
initialBuild: {
|
|
21
|
+
message: "Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster."
|
|
22
|
+
},
|
|
23
|
+
contentStaleRefreshing: {
|
|
24
|
+
message: "A newer version of this documentation is being prepared and will be available shortly."
|
|
25
|
+
},
|
|
26
|
+
contentStaleReady: {
|
|
27
|
+
message: "A newer version of this documentation is now available, please refresh to view.",
|
|
28
|
+
refreshButton: "Refresh"
|
|
29
|
+
},
|
|
30
|
+
contentStaleError: {
|
|
31
|
+
message: "Building a newer version of this documentation failed."
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
redirectNotification: {
|
|
35
|
+
redirectNow: "Redirect now"
|
|
36
|
+
},
|
|
37
|
+
search: {
|
|
38
|
+
noResults: "No results found",
|
|
39
|
+
placeholder: "Search {{entityTitle}} docs"
|
|
40
|
+
},
|
|
41
|
+
readerPageHeader: {
|
|
42
|
+
owner: "Owner",
|
|
43
|
+
lifecycle: "Lifecycle",
|
|
44
|
+
source: "Source"
|
|
45
|
+
},
|
|
46
|
+
home: {
|
|
47
|
+
supportButton: "Discover documentation in your ecosystem."
|
|
48
|
+
},
|
|
49
|
+
pageWrapper: {
|
|
50
|
+
title: "Documentation",
|
|
51
|
+
subtitle: "Documentation available in {{orgName}}"
|
|
52
|
+
},
|
|
53
|
+
table: {
|
|
54
|
+
columns: {
|
|
55
|
+
document: "Document",
|
|
56
|
+
owner: "Owner",
|
|
57
|
+
kind: "Kind",
|
|
58
|
+
type: "Type"
|
|
59
|
+
},
|
|
60
|
+
header: {
|
|
61
|
+
actions: "Actions"
|
|
62
|
+
},
|
|
63
|
+
toolbar: {
|
|
64
|
+
searchPlaceholder: "Filter"
|
|
65
|
+
},
|
|
66
|
+
pagination: {
|
|
67
|
+
labelRowsSelect: "rows"
|
|
68
|
+
},
|
|
69
|
+
body: {
|
|
70
|
+
emptyDataSourceMessage: "No records to display"
|
|
71
|
+
},
|
|
72
|
+
actions: {
|
|
73
|
+
copyDocsUrl: "Click to copy documentation link to clipboard",
|
|
74
|
+
addToFavorites: "Add to favorites",
|
|
75
|
+
removeFromFavorites: "Remove from favorites"
|
|
76
|
+
},
|
|
77
|
+
emptyState: {
|
|
78
|
+
title: "No documents to show",
|
|
79
|
+
description: "Create your own document. Check out our Getting Started Information",
|
|
80
|
+
docsButton: "DOCS"
|
|
81
|
+
},
|
|
82
|
+
title: {
|
|
83
|
+
all: "All"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
error: {
|
|
87
|
+
couldNotLoad: "Could not load available documentation."
|
|
88
|
+
},
|
|
89
|
+
nav: {
|
|
90
|
+
title: "Docs"
|
|
91
|
+
},
|
|
92
|
+
entityContent: {
|
|
93
|
+
title: "TechDocs"
|
|
94
|
+
},
|
|
95
|
+
reader: {
|
|
96
|
+
settings: "Settings"
|
|
8
97
|
}
|
|
9
98
|
}
|
|
10
99
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2025 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 techdocsTranslationRef = createTranslationRef({\n id: 'techdocs',\n messages: {\n aboutCard: {\n viewTechdocs: 'View TechDocs',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,yBAAyB,oBAAA,CAAqB;AAAA,EACzD,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,MACT,YAAA,EAAc;AAAA;
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2025 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 techdocsTranslationRef = createTranslationRef({\n id: 'techdocs',\n messages: {\n aboutCard: {\n viewTechdocs: 'View TechDocs',\n },\n notFound: {\n title: 'Documentation not found',\n builderNote:\n \"Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance.\",\n },\n buildLogs: {\n title: 'Build Details',\n closeDrawer: 'Close the drawer',\n showBuildLogs: 'Show Build Logs',\n waitingForLogs: 'Waiting for logs...',\n },\n stateIndicator: {\n initialBuild: {\n message:\n 'Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.',\n },\n contentStaleRefreshing: {\n message:\n 'A newer version of this documentation is being prepared and will be available shortly.',\n },\n contentStaleReady: {\n message:\n 'A newer version of this documentation is now available, please refresh to view.',\n refreshButton: 'Refresh',\n },\n contentStaleError: {\n message: 'Building a newer version of this documentation failed.',\n },\n },\n redirectNotification: {\n redirectNow: 'Redirect now',\n },\n search: {\n noResults: 'No results found',\n placeholder: 'Search {{entityTitle}} docs',\n },\n readerPageHeader: {\n owner: 'Owner',\n lifecycle: 'Lifecycle',\n source: 'Source',\n },\n home: {\n supportButton: 'Discover documentation in your ecosystem.',\n },\n pageWrapper: {\n title: 'Documentation',\n subtitle: 'Documentation available in {{orgName}}',\n },\n table: {\n columns: {\n document: 'Document',\n owner: 'Owner',\n kind: 'Kind',\n type: 'Type',\n },\n header: {\n actions: 'Actions',\n },\n toolbar: {\n searchPlaceholder: 'Filter',\n },\n pagination: {\n labelRowsSelect: 'rows',\n },\n body: {\n emptyDataSourceMessage: 'No records to display',\n },\n actions: {\n copyDocsUrl: 'Click to copy documentation link to clipboard',\n addToFavorites: 'Add to favorites',\n removeFromFavorites: 'Remove from favorites',\n },\n emptyState: {\n title: 'No documents to show',\n description:\n 'Create your own document. Check out our Getting Started Information',\n docsButton: 'DOCS',\n },\n title: {\n all: 'All',\n },\n },\n error: {\n couldNotLoad: 'Could not load available documentation.',\n },\n nav: {\n title: 'Docs',\n },\n entityContent: {\n title: 'TechDocs',\n },\n reader: {\n settings: 'Settings',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,yBAAyB,oBAAA,CAAqB;AAAA,EACzD,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;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QACP,iBAAA,EAAmB;AAAA,OACrB;AAAA,MACA,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA,OACnB;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,sBAAA,EAAwB;AAAA,OAC1B;AAAA,MACA,OAAA,EAAS;AAAA,QACP,WAAA,EAAa,+CAAA;AAAA,QACb,cAAA,EAAgB,kBAAA;AAAA,QAChB,mBAAA,EAAqB;AAAA,OACvB;AAAA,MACA,UAAA,EAAY;AAAA,QACV,KAAA,EAAO,sBAAA;AAAA,QACP,WAAA,EACE,qEAAA;AAAA,QACF,UAAA,EAAY;AAAA,OACd;AAAA,MACA,KAAA,EAAO;AAAA,QACL,GAAA,EAAK;AAAA;AACP,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,GAAA,EAAK;AAAA,MACH,KAAA,EAAO;AAAA,KACT;AAAA,IACA,aAAA,EAAe;AAAA,MACb,KAAA,EAAO;AAAA,KACT;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,QAAA,EAAU;AAAA;AACZ;AAEJ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-techdocs",
|
|
3
|
-
"version": "1.17.7
|
|
3
|
+
"version": "1.17.7",
|
|
4
4
|
"description": "The Backstage plugin that renders technical documentation for your components",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -71,23 +71,23 @@
|
|
|
71
71
|
"test": "backstage-cli package test"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@backstage/catalog-client": "1.16.0
|
|
75
|
-
"@backstage/catalog-model": "1.9.0",
|
|
76
|
-
"@backstage/config": "1.3.8",
|
|
77
|
-
"@backstage/core-components": "0.18.11
|
|
78
|
-
"@backstage/core-plugin-api": "1.12.
|
|
79
|
-
"@backstage/errors": "1.3.1",
|
|
80
|
-
"@backstage/frontend-plugin-api": "0.17.
|
|
81
|
-
"@backstage/integration": "2.0.3
|
|
82
|
-
"@backstage/integration-react": "1.2.19
|
|
83
|
-
"@backstage/plugin-auth-react": "0.1.28
|
|
84
|
-
"@backstage/plugin-catalog-react": "3.
|
|
85
|
-
"@backstage/plugin-search-common": "1.2.24",
|
|
86
|
-
"@backstage/plugin-search-react": "1.11.5
|
|
87
|
-
"@backstage/plugin-techdocs-common": "0.1.1",
|
|
88
|
-
"@backstage/plugin-techdocs-react": "1.3.12
|
|
89
|
-
"@backstage/theme": "0.7.3",
|
|
90
|
-
"@backstage/ui": "0.
|
|
74
|
+
"@backstage/catalog-client": "^1.16.0",
|
|
75
|
+
"@backstage/catalog-model": "^1.9.0",
|
|
76
|
+
"@backstage/config": "^1.3.8",
|
|
77
|
+
"@backstage/core-components": "^0.18.11",
|
|
78
|
+
"@backstage/core-plugin-api": "^1.12.7",
|
|
79
|
+
"@backstage/errors": "^1.3.1",
|
|
80
|
+
"@backstage/frontend-plugin-api": "^0.17.2",
|
|
81
|
+
"@backstage/integration": "^2.0.3",
|
|
82
|
+
"@backstage/integration-react": "^1.2.19",
|
|
83
|
+
"@backstage/plugin-auth-react": "^0.1.28",
|
|
84
|
+
"@backstage/plugin-catalog-react": "^3.1.0",
|
|
85
|
+
"@backstage/plugin-search-common": "^1.2.24",
|
|
86
|
+
"@backstage/plugin-search-react": "^1.11.5",
|
|
87
|
+
"@backstage/plugin-techdocs-common": "^0.1.1",
|
|
88
|
+
"@backstage/plugin-techdocs-react": "^1.3.12",
|
|
89
|
+
"@backstage/theme": "^0.7.3",
|
|
90
|
+
"@backstage/ui": "^0.16.0",
|
|
91
91
|
"@material-ui/core": "^4.12.2",
|
|
92
92
|
"@material-ui/icons": "^4.9.1",
|
|
93
93
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
"zod": "^4.0.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@backstage/cli": "0.36.3
|
|
106
|
-
"@backstage/core-app-api": "1.20.
|
|
107
|
-
"@backstage/dev-utils": "1.1.24
|
|
108
|
-
"@backstage/plugin-catalog": "2.0.6
|
|
109
|
-
"@backstage/plugin-techdocs-module-addons-contrib": "1.1.37
|
|
110
|
-
"@backstage/test-utils": "1.7.
|
|
105
|
+
"@backstage/cli": "^0.36.3",
|
|
106
|
+
"@backstage/core-app-api": "^1.20.2",
|
|
107
|
+
"@backstage/dev-utils": "^1.1.24",
|
|
108
|
+
"@backstage/plugin-catalog": "^2.0.6",
|
|
109
|
+
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.37",
|
|
110
|
+
"@backstage/test-utils": "^1.7.19",
|
|
111
111
|
"@testing-library/dom": "^10.0.0",
|
|
112
112
|
"@testing-library/jest-dom": "^6.0.0",
|
|
113
113
|
"@testing-library/react": "^16.0.0",
|