@backstage/core-components 0.18.14-next.0 → 0.18.14-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 +10 -0
- package/dist/alpha.d.ts +1 -0
- package/dist/components/LogViewer/LogViewer.esm.js.map +1 -1
- package/dist/components/LogViewer/LogViewerControls.esm.js +19 -1
- package/dist/components/LogViewer/LogViewerControls.esm.js.map +1 -1
- package/dist/components/LogViewer/RealLogViewer.esm.js +9 -1
- package/dist/components/LogViewer/RealLogViewer.esm.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/translation.esm.js +3 -0
- package/dist/translation.esm.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.18.14-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b80a9f3: Added an `onCopyLog` prop to the `LogViewer` component that renders a copy button in the toolbar, allowing users to copy all log content to the clipboard.
|
|
8
|
+
- 279fdf6: Declared the DOM Testing Library dependency required by React Testing Library.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/ui@0.18.0-next.1
|
|
11
|
+
- @backstage/core-plugin-api@1.12.10-next.0
|
|
12
|
+
|
|
3
13
|
## 0.18.14-next.0
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ declare const coreComponentsTranslationRef: _backstage_frontend_plugin_api.Trans
|
|
|
61
61
|
readonly "proxiedSignInPage.title": "You do not appear to be signed in. Please try reloading the browser page.";
|
|
62
62
|
readonly "logViewer.searchField.placeholder": "Search";
|
|
63
63
|
readonly "logViewer.downloadBtn.tooltip": "Download logs";
|
|
64
|
+
readonly "logViewer.copyBtn.tooltip": "Copy logs to clipboard";
|
|
64
65
|
}>;
|
|
65
66
|
|
|
66
67
|
export { coreComponentsTranslationRef };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogViewer.esm.js","sources":["../../../src/components/LogViewer/LogViewer.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 { lazy, Suspense } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\nconst RealLogViewer = lazy(() =>\n import('./RealLogViewer').then(m => ({ default: m.RealLogViewer })),\n);\n\n/**\n * The properties for the LogViewer component.\n *\n * @public\n */\nexport interface LogViewerProps {\n /**\n * Callback function to handle the download log action, and show the download button.\n */\n onDownloadLog?: () => void;\n /**\n * The text of the logs to display.\n *\n * The LogViewer component is optimized for appending content at the end of the text.\n */\n text: string;\n /**\n * Determines if the overflow text should be wrapped or shown via a single line in a horizontal scrollbar.\n */\n textWrap?: boolean;\n /**\n * Styling overrides for classes within the LogViewer component.\n */\n classes?: {\n root?: string;\n };\n}\n\n/**\n * A component that displays logs in a scrollable text area.\n *\n * @remarks\n * The LogViewer has support for search and filtering, as well as displaying\n * text content with ANSI color escape codes.\n *\n * Since the LogViewer uses windowing to avoid rendering all contents at once, the\n * log is sized automatically to fill the available vertical space. This means\n * it may often be needed to wrap the LogViewer in a container that provides it\n * with a fixed amount of space.\n *\n * @public\n */\nexport function LogViewer(props: LogViewerProps) {\n const { Progress } = useApp().getComponents();\n return (\n <Suspense fallback={<Progress />}>\n <RealLogViewer {...props} />\n </Suspense>\n );\n}\n"],"names":[],"mappings":";;;;AAmBA,MAAM,aAAA,GAAgB,IAAA;AAAA,EAAK,MACzB,OAAO,wBAAiB,CAAA,CAAE,IAAA,CAAK,QAAM,EAAE,OAAA,EAAS,CAAA,CAAE,aAAA,EAAc,CAAE;AACpE,CAAA;
|
|
1
|
+
{"version":3,"file":"LogViewer.esm.js","sources":["../../../src/components/LogViewer/LogViewer.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 { lazy, Suspense } from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\nconst RealLogViewer = lazy(() =>\n import('./RealLogViewer').then(m => ({ default: m.RealLogViewer })),\n);\n\n/**\n * The properties for the LogViewer component.\n *\n * @public\n */\nexport interface LogViewerProps {\n /**\n * Callback function to handle the download log action, and show the download button.\n */\n onDownloadLog?: () => void;\n /**\n * Callback function to handle the copy log action, and show the copy button.\n */\n onCopyLog?: () => void | Promise<void>;\n /**\n * The text of the logs to display.\n *\n * The LogViewer component is optimized for appending content at the end of the text.\n */\n text: string;\n /**\n * Determines if the overflow text should be wrapped or shown via a single line in a horizontal scrollbar.\n */\n textWrap?: boolean;\n /**\n * Styling overrides for classes within the LogViewer component.\n */\n classes?: {\n root?: string;\n };\n}\n\n/**\n * A component that displays logs in a scrollable text area.\n *\n * @remarks\n * The LogViewer has support for search and filtering, as well as displaying\n * text content with ANSI color escape codes.\n *\n * Since the LogViewer uses windowing to avoid rendering all contents at once, the\n * log is sized automatically to fill the available vertical space. This means\n * it may often be needed to wrap the LogViewer in a container that provides it\n * with a fixed amount of space.\n *\n * @public\n */\nexport function LogViewer(props: LogViewerProps) {\n const { Progress } = useApp().getComponents();\n return (\n <Suspense fallback={<Progress />}>\n <RealLogViewer {...props} />\n </Suspense>\n );\n}\n"],"names":[],"mappings":";;;;AAmBA,MAAM,aAAA,GAAgB,IAAA;AAAA,EAAK,MACzB,OAAO,wBAAiB,CAAA,CAAE,IAAA,CAAK,QAAM,EAAE,OAAA,EAAS,CAAA,CAAE,aAAA,EAAc,CAAE;AACpE,CAAA;AAgDO,SAAS,UAAU,KAAA,EAAuB;AAC/C,EAAA,MAAM,EAAE,QAAA,EAAS,GAAI,MAAA,GAAS,aAAA,EAAc;AAC5C,EAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,QAAA,kBAAU,GAAA,CAAC,QAAA,EAAA,EAAS,GAC5B,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAe,GAAG,KAAA,EAAO,CAAA,EAC5B,CAAA;AAEJ;;;;"}
|
|
@@ -7,6 +7,7 @@ import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
|
|
|
7
7
|
import ChevronRight from '@material-ui/icons/ChevronRight';
|
|
8
8
|
import FilterList from '@material-ui/icons/FilterList';
|
|
9
9
|
import GetApp from '@material-ui/icons/GetApp';
|
|
10
|
+
import CopyIcon from '@material-ui/icons/FileCopy';
|
|
10
11
|
import Tooltip from '@material-ui/core/Tooltip';
|
|
11
12
|
import { coreComponentsTranslationRef } from '../../translation.esm.js';
|
|
12
13
|
|
|
@@ -45,7 +46,24 @@ function LogViewerControls(props) {
|
|
|
45
46
|
}
|
|
46
47
|
),
|
|
47
48
|
/* @__PURE__ */ jsx(IconButton, { size: "small", onClick: toggleShouldFilter, children: props.shouldFilter ? /* @__PURE__ */ jsx(FilterList, { color: "primary" }) : /* @__PURE__ */ jsx(FilterList, { color: "disabled" }) }),
|
|
48
|
-
Boolean(props?.
|
|
49
|
+
Boolean(props?.onCopyLog) ? /* @__PURE__ */ jsx(Tooltip, { title: t("logViewer.copyBtn.tooltip"), children: /* @__PURE__ */ jsx(
|
|
50
|
+
IconButton,
|
|
51
|
+
{
|
|
52
|
+
"aria-label": t("logViewer.copyBtn.tooltip"),
|
|
53
|
+
size: "small",
|
|
54
|
+
onClick: props.onCopyLog,
|
|
55
|
+
children: /* @__PURE__ */ jsx(CopyIcon, {})
|
|
56
|
+
}
|
|
57
|
+
) }) : null,
|
|
58
|
+
Boolean(props?.onDownloadLog) ? /* @__PURE__ */ jsx(Tooltip, { title: t("logViewer.downloadBtn.tooltip"), children: /* @__PURE__ */ jsx(
|
|
59
|
+
IconButton,
|
|
60
|
+
{
|
|
61
|
+
"aria-label": t("logViewer.downloadBtn.tooltip"),
|
|
62
|
+
size: "small",
|
|
63
|
+
onClick: props.onDownloadLog,
|
|
64
|
+
children: /* @__PURE__ */ jsx(GetApp, {})
|
|
65
|
+
}
|
|
66
|
+
) }) : null
|
|
49
67
|
] });
|
|
50
68
|
}
|
|
51
69
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogViewerControls.esm.js","sources":["../../../src/components/LogViewer/LogViewerControls.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 { KeyboardEvent } from 'react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport IconButton from '@material-ui/core/IconButton';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\nimport FilterListIcon from '@material-ui/icons/FilterList';\nimport GetApp from '@material-ui/icons/GetApp';\nimport ToolTip from '@material-ui/core/Tooltip';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { LogViewerSearch } from './useLogViewerSearch';\n\nexport interface LogViewerControlsProps extends LogViewerSearch {\n onDownloadLog?: () => void;\n}\n\nexport function LogViewerControls(props: LogViewerControlsProps) {\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n const { resultCount, resultIndexStep, toggleShouldFilter } = props;\n const resultIndex = props.resultIndex ?? 0;\n\n const handleKeyPress = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n if (event.metaKey || event.ctrlKey || event.altKey) {\n toggleShouldFilter();\n } else {\n resultIndexStep(event.shiftKey);\n }\n }\n };\n\n return (\n <>\n {resultCount !== undefined && (\n <>\n <IconButton size=\"small\" onClick={() => resultIndexStep(true)}>\n <ChevronLeftIcon />\n </IconButton>\n <Typography>\n {Math.min(resultIndex + 1, resultCount)}/{resultCount}\n </Typography>\n <IconButton size=\"small\" onClick={() => resultIndexStep()}>\n <ChevronRightIcon />\n </IconButton>\n </>\n )}\n <TextField\n size=\"small\"\n variant=\"standard\"\n placeholder={t('logViewer.searchField.placeholder')}\n value={props.searchInput}\n onKeyPress={handleKeyPress}\n onChange={e => props.setSearchInput(e.target.value)}\n />\n <IconButton size=\"small\" onClick={toggleShouldFilter}>\n {props.shouldFilter ? (\n <FilterListIcon color=\"primary\" />\n ) : (\n <FilterListIcon color=\"disabled\" />\n )}\n </IconButton>\n {Boolean(props?.onDownloadLog) ? (\n <ToolTip title={t('logViewer.downloadBtn.tooltip')}>\n <IconButton
|
|
1
|
+
{"version":3,"file":"LogViewerControls.esm.js","sources":["../../../src/components/LogViewer/LogViewerControls.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 { KeyboardEvent } from 'react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport IconButton from '@material-ui/core/IconButton';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\nimport FilterListIcon from '@material-ui/icons/FilterList';\nimport GetApp from '@material-ui/icons/GetApp';\nimport FileCopyIcon from '@material-ui/icons/FileCopy';\nimport ToolTip from '@material-ui/core/Tooltip';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { LogViewerSearch } from './useLogViewerSearch';\n\nexport interface LogViewerControlsProps extends LogViewerSearch {\n onDownloadLog?: () => void;\n onCopyLog?: () => void;\n}\n\nexport function LogViewerControls(props: LogViewerControlsProps) {\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n const { resultCount, resultIndexStep, toggleShouldFilter } = props;\n const resultIndex = props.resultIndex ?? 0;\n\n const handleKeyPress = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n if (event.metaKey || event.ctrlKey || event.altKey) {\n toggleShouldFilter();\n } else {\n resultIndexStep(event.shiftKey);\n }\n }\n };\n\n return (\n <>\n {resultCount !== undefined && (\n <>\n <IconButton size=\"small\" onClick={() => resultIndexStep(true)}>\n <ChevronLeftIcon />\n </IconButton>\n <Typography>\n {Math.min(resultIndex + 1, resultCount)}/{resultCount}\n </Typography>\n <IconButton size=\"small\" onClick={() => resultIndexStep()}>\n <ChevronRightIcon />\n </IconButton>\n </>\n )}\n <TextField\n size=\"small\"\n variant=\"standard\"\n placeholder={t('logViewer.searchField.placeholder')}\n value={props.searchInput}\n onKeyPress={handleKeyPress}\n onChange={e => props.setSearchInput(e.target.value)}\n />\n <IconButton size=\"small\" onClick={toggleShouldFilter}>\n {props.shouldFilter ? (\n <FilterListIcon color=\"primary\" />\n ) : (\n <FilterListIcon color=\"disabled\" />\n )}\n </IconButton>\n {Boolean(props?.onCopyLog) ? (\n <ToolTip title={t('logViewer.copyBtn.tooltip')}>\n <IconButton\n aria-label={t('logViewer.copyBtn.tooltip')}\n size=\"small\"\n onClick={props.onCopyLog}\n >\n <FileCopyIcon />\n </IconButton>\n </ToolTip>\n ) : null}\n {Boolean(props?.onDownloadLog) ? (\n <ToolTip title={t('logViewer.downloadBtn.tooltip')}>\n <IconButton\n aria-label={t('logViewer.downloadBtn.tooltip')}\n size=\"small\"\n onClick={props.onDownloadLog}\n >\n <GetApp />\n </IconButton>\n </ToolTip>\n ) : null}\n </>\n );\n}\n"],"names":["ChevronRightIcon","FilterListIcon","ToolTip","FileCopyIcon"],"mappings":";;;;;;;;;;;;;AAmCO,SAAS,kBAAkB,KAAA,EAA+B;AAC/D,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,4BAA4B,CAAA;AAC5D,EAAA,MAAM,EAAE,WAAA,EAAa,eAAA,EAAiB,kBAAA,EAAmB,GAAI,KAAA;AAC7D,EAAA,MAAM,WAAA,GAAc,MAAM,WAAA,IAAe,CAAA;AAEzC,EAAA,MAAM,cAAA,GAAiB,CAAC,KAAA,KAA2C;AACjE,IAAA,IAAI,KAAA,CAAM,QAAQ,OAAA,EAAS;AACzB,MAAA,IAAI,KAAA,CAAM,OAAA,IAAW,KAAA,CAAM,OAAA,IAAW,MAAM,MAAA,EAAQ;AAClD,QAAA,kBAAA,EAAmB;AAAA,MACrB,CAAA,MAAO;AACL,QAAA,eAAA,CAAgB,MAAM,QAAQ,CAAA;AAAA,MAChC;AAAA,IACF;AAAA,EACF,CAAA;AAEA,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,WAAA,KAAgB,0BACf,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,UAAA,EAAA,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E,2BAA2B,CAAA;AAAA,QACzC,IAAA,EAAK,OAAA;AAAA,QACL,SAAS,KAAA,CAAM,SAAA;AAAA,QAEf,8BAACC,QAAA,EAAA,EAAa;AAAA;AAAA,OAElB,CAAA,GACE,IAAA;AAAA,IACH,OAAA,CAAQ,OAAO,aAAa,CAAA,uBAC1BD,OAAA,EAAA,EAAQ,KAAA,EAAO,CAAA,CAAE,+BAA+B,CAAA,EAC/C,QAAA,kBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,YAAA,EAAY,EAAE,+BAA+B,CAAA;AAAA,QAC7C,IAAA,EAAK,OAAA;AAAA,QACL,SAAS,KAAA,CAAM,aAAA;AAAA,QAEf,8BAAC,MAAA,EAAA,EAAO;AAAA;AAAA,OAEZ,CAAA,GACE;AAAA,GAAA,EACN,CAAA;AAEJ;;;;"}
|
|
@@ -64,6 +64,13 @@ function RealLogViewer(props) {
|
|
|
64
64
|
selection.copySelection(line);
|
|
65
65
|
setShowCopyInfo(true);
|
|
66
66
|
};
|
|
67
|
+
const handleCopyLog = async () => {
|
|
68
|
+
try {
|
|
69
|
+
await props.onCopyLog?.();
|
|
70
|
+
setShowCopyInfo(true);
|
|
71
|
+
} catch {
|
|
72
|
+
}
|
|
73
|
+
};
|
|
67
74
|
function setRowHeight(index, size) {
|
|
68
75
|
if (shouldTextWrap && listInstance) {
|
|
69
76
|
listInstance.resetAfterIndex(0);
|
|
@@ -139,7 +146,8 @@ function RealLogViewer(props) {
|
|
|
139
146
|
LogViewerControls,
|
|
140
147
|
{
|
|
141
148
|
...search,
|
|
142
|
-
onDownloadLog: props.onDownloadLog
|
|
149
|
+
onDownloadLog: props.onDownloadLog,
|
|
150
|
+
onCopyLog: props.onCopyLog ? handleCopyLog : void 0
|
|
143
151
|
}
|
|
144
152
|
) }),
|
|
145
153
|
shouldTextWrap ? /* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealLogViewer.esm.js","sources":["../../../src/components/LogViewer/RealLogViewer.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 Box from '@material-ui/core/Box';\nimport IconButton from '@material-ui/core/IconButton';\nimport CopyIcon from '@material-ui/icons/FileCopy';\nimport classnames from 'classnames';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { FixedSizeList, VariableSizeList } from 'react-window';\n\nimport { AnsiLine, AnsiProcessor } from './AnsiProcessor';\nimport { LogLine } from './LogLine';\nimport { LogViewerControls } from './LogViewerControls';\nimport { HEADER_SIZE, useStyles } from './styles';\nimport { useLogViewerSearch } from './useLogViewerSearch';\nimport { useLogViewerSelection } from './useLogViewerSelection';\nimport Snackbar from '@material-ui/core/Snackbar';\n\nexport interface RealLogViewerProps {\n showDownloadButton?: boolean;\n onDownloadLog?: () => void;\n text: string;\n textWrap?: boolean;\n classes?: { root?: string };\n}\n\nexport function RealLogViewer(props: RealLogViewerProps) {\n const classes = useStyles({ classes: props.classes });\n const [listInstance, setListInstance] = useState<\n VariableSizeList<AnsiLine[]> | FixedSizeList<AnsiLine[]> | null\n >(null);\n const shouldTextWrap = props.textWrap ?? false;\n const heights = useRef<{ [key: number]: number }>({});\n\n // The processor keeps state that optimizes appending to the text\n const processor = useMemo(() => new AnsiProcessor(), []);\n const lines = processor.process(props.text);\n const [showCopyInfo, setShowCopyInfo] = useState(false);\n\n const search = useLogViewerSearch(lines);\n const selection = useLogViewerSelection(lines);\n const location = useLocation();\n\n useEffect(() => {\n if (listInstance) {\n listInstance.scrollToItem(lines.length - 1, 'end');\n }\n }, [listInstance, lines]);\n\n useEffect(() => {\n if (!listInstance) {\n return;\n }\n if (search.resultLine) {\n listInstance.scrollToItem(search.resultLine - 1, 'center');\n } else {\n listInstance.scrollToItem(lines.length - 1, 'end');\n }\n }, [listInstance, search.resultLine, lines]);\n\n useEffect(() => {\n const hash = selection.getHash();\n if (hash.length > 0) {\n history.replaceState(null, '', hash);\n }\n }, [selection]);\n\n useEffect(() => {\n if (location.hash) {\n selection.selectAll(location.hash);\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleSelectLine = (\n line: number,\n event: {\n shiftKey: boolean;\n metaKey: boolean;\n ctrlKey: boolean;\n preventDefault: () => void;\n },\n ) => {\n event.preventDefault();\n selection.setSelection(\n line,\n event.shiftKey,\n event.metaKey || event.ctrlKey,\n );\n };\n\n const handleCopySelection = (line: number) => {\n selection.copySelection(line);\n setShowCopyInfo(true);\n };\n\n function setRowHeight(index: number, size: number) {\n if (shouldTextWrap && listInstance) {\n (listInstance as VariableSizeList<AnsiLine[]>).resetAfterIndex(0);\n // lineNumber is 1-based but index is 0-based\n heights.current[index - 1] = size;\n }\n }\n\n function getRowHeight(index: number) {\n return heights.current[index] || 20;\n }\n\n return (\n <>\n <AutoSizer>\n {({ height, width }: { height?: number; width?: number }) => {\n const commonProps = {\n ref: setListInstance,\n className: classes.log,\n height: (height || 480) - HEADER_SIZE,\n width: width || 640,\n itemData: search.lines,\n itemCount: search.lines.length,\n };\n\n const renderItem = ({\n index,\n style,\n data,\n }: {\n index: number;\n style: React.CSSProperties;\n data: AnsiLine[];\n }) => {\n const line = data[index];\n const { lineNumber } = line;\n return (\n <Box\n style={{ ...style }}\n className={classnames(classes.line, {\n [classes.lineSelected]: selection.isSelected(lineNumber),\n })}\n >\n {selection.shouldShowCopyButton(lineNumber) && (\n <IconButton\n data-testid=\"copy-button\"\n size=\"small\"\n className={classes.lineCopyButton}\n onClick={() => handleCopySelection(lineNumber)}\n >\n <CopyIcon fontSize=\"inherit\" />\n </IconButton>\n )}\n <a\n role=\"row\"\n target=\"_self\"\n href={`#line-${lineNumber}`}\n className={classes.lineNumber}\n onClick={event => handleSelectLine(lineNumber, event)}\n onKeyPress={event => handleSelectLine(lineNumber, event)}\n >\n {lineNumber}\n </a>\n <LogLine\n setRowHeight={shouldTextWrap ? setRowHeight : undefined}\n line={line}\n classes={classes}\n searchText={search.searchText}\n highlightResultIndex={\n search.resultLine === lineNumber\n ? search.resultLineIndex\n : undefined\n }\n />\n </Box>\n );\n };\n\n return (\n <Box style={{ width, height }} className={classes.root}>\n <Box className={classes.header}>\n <LogViewerControls\n {...search}\n onDownloadLog={props.onDownloadLog}\n />\n </Box>\n {shouldTextWrap ? (\n <VariableSizeList<AnsiLine[]>\n {...commonProps}\n itemSize={getRowHeight}\n >\n {renderItem}\n </VariableSizeList>\n ) : (\n <FixedSizeList<AnsiLine[]> {...commonProps} itemSize={20}>\n {renderItem}\n </FixedSizeList>\n )}\n </Box>\n );\n }}\n </AutoSizer>\n <Snackbar\n open={showCopyInfo}\n autoHideDuration={3000}\n onClose={() => setShowCopyInfo(false)}\n message=\"Lines copied to clipboard\"\n anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}\n />\n </>\n );\n}\n"],"names":["classnames"],"mappings":";;;;;;;;;;;;;;;;;AAyCO,SAAS,cAAc,KAAA,EAA2B;AACvD,EAAA,MAAM,UAAU,SAAA,CAAU,EAAE,OAAA,EAAS,KAAA,CAAM,SAAS,CAAA;AACpD,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,SAEtC,IAAI,CAAA;AACN,EAAA,MAAM,cAAA,GAAiB,MAAM,QAAA,IAAY,KAAA;AACzC,EAAA,MAAM,OAAA,GAAU,MAAA,CAAkC,EAAE,CAAA;AAGpD,EAAA,MAAM,YAAY,OAAA,CAAQ,MAAM,IAAI,aAAA,EAAc,EAAG,EAAE,CAAA;AACvD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Y,QAAA;AAAS;AAAA;AAC3D,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"RealLogViewer.esm.js","sources":["../../../src/components/LogViewer/RealLogViewer.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 Box from '@material-ui/core/Box';\nimport IconButton from '@material-ui/core/IconButton';\nimport CopyIcon from '@material-ui/icons/FileCopy';\nimport classnames from 'classnames';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { FixedSizeList, VariableSizeList } from 'react-window';\n\nimport { AnsiLine, AnsiProcessor } from './AnsiProcessor';\nimport { LogLine } from './LogLine';\nimport { LogViewerControls } from './LogViewerControls';\nimport { HEADER_SIZE, useStyles } from './styles';\nimport { useLogViewerSearch } from './useLogViewerSearch';\nimport { useLogViewerSelection } from './useLogViewerSelection';\nimport Snackbar from '@material-ui/core/Snackbar';\n\nexport interface RealLogViewerProps {\n showDownloadButton?: boolean;\n onDownloadLog?: () => void;\n onCopyLog?: () => void | Promise<void>;\n text: string;\n textWrap?: boolean;\n classes?: { root?: string };\n}\n\nexport function RealLogViewer(props: RealLogViewerProps) {\n const classes = useStyles({ classes: props.classes });\n const [listInstance, setListInstance] = useState<\n VariableSizeList<AnsiLine[]> | FixedSizeList<AnsiLine[]> | null\n >(null);\n const shouldTextWrap = props.textWrap ?? false;\n const heights = useRef<{ [key: number]: number }>({});\n\n // The processor keeps state that optimizes appending to the text\n const processor = useMemo(() => new AnsiProcessor(), []);\n const lines = processor.process(props.text);\n const [showCopyInfo, setShowCopyInfo] = useState(false);\n\n const search = useLogViewerSearch(lines);\n const selection = useLogViewerSelection(lines);\n const location = useLocation();\n\n useEffect(() => {\n if (listInstance) {\n listInstance.scrollToItem(lines.length - 1, 'end');\n }\n }, [listInstance, lines]);\n\n useEffect(() => {\n if (!listInstance) {\n return;\n }\n if (search.resultLine) {\n listInstance.scrollToItem(search.resultLine - 1, 'center');\n } else {\n listInstance.scrollToItem(lines.length - 1, 'end');\n }\n }, [listInstance, search.resultLine, lines]);\n\n useEffect(() => {\n const hash = selection.getHash();\n if (hash.length > 0) {\n history.replaceState(null, '', hash);\n }\n }, [selection]);\n\n useEffect(() => {\n if (location.hash) {\n selection.selectAll(location.hash);\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleSelectLine = (\n line: number,\n event: {\n shiftKey: boolean;\n metaKey: boolean;\n ctrlKey: boolean;\n preventDefault: () => void;\n },\n ) => {\n event.preventDefault();\n selection.setSelection(\n line,\n event.shiftKey,\n event.metaKey || event.ctrlKey,\n );\n };\n\n const handleCopySelection = (line: number) => {\n selection.copySelection(line);\n setShowCopyInfo(true);\n };\n\n const handleCopyLog = async () => {\n try {\n await props.onCopyLog?.();\n setShowCopyInfo(true);\n } catch {\n // The callback owns error reporting; only show confirmation on success.\n }\n };\n\n function setRowHeight(index: number, size: number) {\n if (shouldTextWrap && listInstance) {\n (listInstance as VariableSizeList<AnsiLine[]>).resetAfterIndex(0);\n // lineNumber is 1-based but index is 0-based\n heights.current[index - 1] = size;\n }\n }\n\n function getRowHeight(index: number) {\n return heights.current[index] || 20;\n }\n\n return (\n <>\n <AutoSizer>\n {({ height, width }: { height?: number; width?: number }) => {\n const commonProps = {\n ref: setListInstance,\n className: classes.log,\n height: (height || 480) - HEADER_SIZE,\n width: width || 640,\n itemData: search.lines,\n itemCount: search.lines.length,\n };\n\n const renderItem = ({\n index,\n style,\n data,\n }: {\n index: number;\n style: React.CSSProperties;\n data: AnsiLine[];\n }) => {\n const line = data[index];\n const { lineNumber } = line;\n return (\n <Box\n style={{ ...style }}\n className={classnames(classes.line, {\n [classes.lineSelected]: selection.isSelected(lineNumber),\n })}\n >\n {selection.shouldShowCopyButton(lineNumber) && (\n <IconButton\n data-testid=\"copy-button\"\n size=\"small\"\n className={classes.lineCopyButton}\n onClick={() => handleCopySelection(lineNumber)}\n >\n <CopyIcon fontSize=\"inherit\" />\n </IconButton>\n )}\n <a\n role=\"row\"\n target=\"_self\"\n href={`#line-${lineNumber}`}\n className={classes.lineNumber}\n onClick={event => handleSelectLine(lineNumber, event)}\n onKeyPress={event => handleSelectLine(lineNumber, event)}\n >\n {lineNumber}\n </a>\n <LogLine\n setRowHeight={shouldTextWrap ? setRowHeight : undefined}\n line={line}\n classes={classes}\n searchText={search.searchText}\n highlightResultIndex={\n search.resultLine === lineNumber\n ? search.resultLineIndex\n : undefined\n }\n />\n </Box>\n );\n };\n\n return (\n <Box style={{ width, height }} className={classes.root}>\n <Box className={classes.header}>\n <LogViewerControls\n {...search}\n onDownloadLog={props.onDownloadLog}\n onCopyLog={props.onCopyLog ? handleCopyLog : undefined}\n />\n </Box>\n {shouldTextWrap ? (\n <VariableSizeList<AnsiLine[]>\n {...commonProps}\n itemSize={getRowHeight}\n >\n {renderItem}\n </VariableSizeList>\n ) : (\n <FixedSizeList<AnsiLine[]> {...commonProps} itemSize={20}>\n {renderItem}\n </FixedSizeList>\n )}\n </Box>\n );\n }}\n </AutoSizer>\n <Snackbar\n open={showCopyInfo}\n autoHideDuration={3000}\n onClose={() => setShowCopyInfo(false)}\n message=\"Lines copied to clipboard\"\n anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}\n />\n </>\n );\n}\n"],"names":["classnames"],"mappings":";;;;;;;;;;;;;;;;;AA0CO,SAAS,cAAc,KAAA,EAA2B;AACvD,EAAA,MAAM,UAAU,SAAA,CAAU,EAAE,OAAA,EAAS,KAAA,CAAM,SAAS,CAAA;AACpD,EA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AAA;AAAA,UAAA;AAAA,YACE,GAAG,WAAA;AAAA,YACJ,QAAA,EAAU,YAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA,4BAGH,GAAA,CAAC,aAAA,EAAA,EAA2B,GAAG,WAAA,EAAa,QAAA,EAAU,IACnD,QAAA,EAAA,UAAA,EACH;AAAA,OAAA,EAEJ,CAAA;AAAA,IAEJ,CAAA,EACF,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,YAAA;AAAA,QACN,gBAAA,EAAkB,GAAA;AAAA,QAClB,OAAA,EAAS,MAAM,eAAA,CAAgB,KAAK,CAAA;AAAA,QACpC,OAAA,EAAQ,2BAAA;AAAA,QACR,YAAA,EAAc,EAAE,QAAA,EAAU,QAAA,EAAU,YAAY,QAAA;AAAS;AAAA;AAC3D,GAAA,EACF,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -916,6 +916,10 @@ interface LogViewerProps {
|
|
|
916
916
|
* Callback function to handle the download log action, and show the download button.
|
|
917
917
|
*/
|
|
918
918
|
onDownloadLog?: () => void;
|
|
919
|
+
/**
|
|
920
|
+
* Callback function to handle the copy log action, and show the copy button.
|
|
921
|
+
*/
|
|
922
|
+
onCopyLog?: () => void | Promise<void>;
|
|
919
923
|
/**
|
|
920
924
|
* The text of the logs to display.
|
|
921
925
|
*
|
|
@@ -2416,6 +2420,7 @@ declare const coreComponentsTranslationRef: _backstage_frontend_plugin_api.Trans
|
|
|
2416
2420
|
readonly "proxiedSignInPage.title": "You do not appear to be signed in. Please try reloading the browser page.";
|
|
2417
2421
|
readonly "logViewer.searchField.placeholder": "Search";
|
|
2418
2422
|
readonly "logViewer.downloadBtn.tooltip": "Download logs";
|
|
2423
|
+
readonly "logViewer.copyBtn.tooltip": "Copy logs to clipboard";
|
|
2419
2424
|
}>;
|
|
2420
2425
|
|
|
2421
2426
|
export { AlertDisplay, AppIcon, AutoLogout, Avatar, BottomLink, Breadcrumbs, BrokenImageIcon, Button, CardTab, CatalogIcon, ChatIcon, CodeSnippet, Content, ContentHeader, CopyTextButton, CreateButton, DashboardIcon, DependencyGraph, DependencyGraphTypes, DismissableBanner, DocsIcon, EmailIcon, EmptyState, ErrorBoundary, ErrorPage, ErrorPanel, FavoriteToggle, FavoriteToggleIcon, FeatureCalloutCircular, Gauge, GaugeCard, GitHubIcon, GroupIcon, Header, HeaderActionMenu, HeaderIconLinkRow, HeaderLabel, HeaderTabs, HelpIcon, HorizontalScrollGrid, IconLinkVertical, InfoCard, ItemCard, ItemCardGrid, ItemCardHeader, Lifecycle, LinearGauge, Link, LinkButton, LogViewer, MarkdownContent, MissingAnnotationEmptyState, MobileSidebar, OAuthRequestDialog, OverflowTooltip, Page, PageWithHeader, Progress, ProxiedSignInPage, ResponseErrorPanel, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, Sidebar, LegacySidebarContext as SidebarContext, SidebarDivider, SidebarExpandButton, SidebarGroup, SidebarItem, SidebarOpenStateProvider, SidebarPage, LegacySidebarPinStateContext as SidebarPinStateContext, SidebarPinStateProvider, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, SidebarSpacer, SidebarSubmenu, SidebarSubmenuItem, SignInPage, SimpleStepper, SimpleStepperStep, StarIcon, StatusAborted, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, SubvalueCell, SupportButton, TabbedCard, TabbedLayout, Table, TrendLine, UnstarredIcon, UserIcon, UserIdentity, WarningIcon, WarningPanel, coreComponentsTranslationRef, sidebarConfig, useContent, useQueryParamState, useSidebarOpenState, useSidebarPinState, useSupportConfig };
|
package/dist/translation.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../src/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/** @public */\nexport const coreComponentsTranslationRef = createTranslationRef({\n id: 'core-components',\n messages: {\n signIn: {\n title: 'Sign In',\n loginFailed: 'Login failed',\n customProvider: {\n title: 'Custom User',\n subtitle:\n 'Enter your own User ID and credentials.\\n This selection will not be stored.',\n userId: 'User ID',\n tokenInvalid: 'Token is not a valid OpenID Connect JWT Token',\n continue: 'Continue',\n idToken: 'ID Token (optional)',\n },\n guestProvider: {\n title: 'Guest',\n subtitle:\n 'Enter as a Guest User.\\n You will not have a verified identity, meaning some features might be unavailable.',\n enter: 'Enter',\n },\n },\n skipToContent: 'Skip to content',\n copyTextButton: {\n tooltipText: 'Text copied to clipboard',\n },\n simpleStepper: {\n reset: 'Reset',\n finish: 'Finish',\n next: 'Next',\n skip: 'Skip',\n back: 'Back',\n },\n errorPage: {\n subtitle: 'ERROR {{status}}: {{statusMessage}}',\n title: 'Looks like someone dropped the mic!',\n goBack: 'Go back',\n showMoreDetails: 'Show more details',\n showLessDetails: 'Show less details',\n },\n emptyState: {\n missingAnnotation: {\n title: 'Missing Annotation',\n actionTitle:\n 'Add the annotation to your component YAML as shown in the highlighted example below:',\n readMore: 'Read more',\n },\n },\n supportConfig: {\n default: {\n title: 'Support Not Configured',\n linkTitle: 'Add `app.support` config key',\n },\n },\n errorBoundary: {\n title: 'Please contact {{slackChannel}} for help.',\n },\n oauthRequestDialog: {\n title: 'Login Required',\n authRedirectTitle: 'This will trigger a http redirect to OAuth Login.',\n login: 'Log in',\n rejectAll: 'Reject All',\n message:\n 'Sign-in to allow {{appTitle}} access to {{provider}} APIs and identities.',\n },\n supportButton: {\n title: 'Support',\n close: 'Close',\n },\n table: {\n filter: {\n title: 'Filters',\n clearAll: 'Clear all',\n placeholder: 'All results',\n },\n body: {\n emptyDataSourceMessage: 'No records to display',\n },\n pagination: {\n firstTooltip: 'First Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsSelect: 'rows',\n lastTooltip: 'Last Page',\n nextTooltip: 'Next Page',\n previousTooltip: 'Previous Page',\n },\n toolbar: {\n search: 'Filter',\n },\n header: {\n actions: 'Actions',\n },\n },\n alertDisplay: {\n message_one: '({{ count }} newer message)',\n message_other: '({{ count }} newer messages)',\n },\n autoLogout: {\n stillTherePrompt: {\n title: 'Logging out due to inactivity',\n buttonText: \"Yes! Don't log me out\",\n },\n },\n dependencyGraph: {\n fullscreenTooltip: 'Toggle fullscreen',\n },\n proxiedSignInPage: {\n title:\n 'You do not appear to be signed in. Please try reloading the browser page.',\n },\n logViewer: {\n downloadBtn: {\n tooltip: 'Download logs',\n },\n searchField: {\n placeholder: 'Search',\n },\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,+BAA+B,oBAAA,CAAqB;AAAA,EAC/D,EAAA,EAAI,iBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,SAAA;AAAA,MACP,WAAA,EAAa,cAAA;AAAA,MACb,cAAA,EAAgB;AAAA,QACd,KAAA,EAAO,aAAA;AAAA,QACP,QAAA,EACE,8EAAA;AAAA,QACF,MAAA,EAAQ,SAAA;AAAA,QACR,YAAA,EAAc,+CAAA;AAAA,QACd,QAAA,EAAU,UAAA;AAAA,QACV,OAAA,EAAS;AAAA,OACX;AAAA,MACA,aAAA,EAAe;AAAA,QACb,KAAA,EAAO,OAAA;AAAA,QACP,QAAA,EACE,6GAAA;AAAA,QACF,KAAA,EAAO;AAAA;AACT,KACF;AAAA,IACA,aAAA,EAAe,iBAAA;AAAA,IACf,cAAA,EAAgB;AAAA,MACd,WAAA,EAAa;AAAA,KAC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A,QACpB,eAAA,EAAiB,MAAA;AAAA,QACjB,WAAA,EAAa,WAAA;AAAA,QACb,WAAA,EAAa,WAAA;AAAA,QACb,eAAA,EAAiB;AAAA,OACnB;AAAA,MACA,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,OAAA,EAAS;AAAA;AACX,KACF;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,WAAA,EAAa,6BAAA;AAAA,MACb,aAAA,EAAe;AAAA,KACjB;AAAA,IACA,UAAA,EAAY;AAAA,MACV,gBAAA,EAAkB;AAAA,QAChB,KAAA,EAAO,+BAAA;AAAA,QACP,UAAA,EAAY;AAAA;AACd,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,iBAAA,EAAmB;AAAA,KACrB;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EACE;AAAA,KACJ;AAAA,IACA,SAAA,EAAW;AAAA,MACT,WAAA,EAAa;AAAA,QACX,OAAA,EAAS;AAAA,OACX;AAAA,MACA,WAAA,EAAa;AAAA,QACX,WAAA,EAAa;AAAA;AACf;AACF;AAEJ,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../src/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/** @public */\nexport const coreComponentsTranslationRef = createTranslationRef({\n id: 'core-components',\n messages: {\n signIn: {\n title: 'Sign In',\n loginFailed: 'Login failed',\n customProvider: {\n title: 'Custom User',\n subtitle:\n 'Enter your own User ID and credentials.\\n This selection will not be stored.',\n userId: 'User ID',\n tokenInvalid: 'Token is not a valid OpenID Connect JWT Token',\n continue: 'Continue',\n idToken: 'ID Token (optional)',\n },\n guestProvider: {\n title: 'Guest',\n subtitle:\n 'Enter as a Guest User.\\n You will not have a verified identity, meaning some features might be unavailable.',\n enter: 'Enter',\n },\n },\n skipToContent: 'Skip to content',\n copyTextButton: {\n tooltipText: 'Text copied to clipboard',\n },\n simpleStepper: {\n reset: 'Reset',\n finish: 'Finish',\n next: 'Next',\n skip: 'Skip',\n back: 'Back',\n },\n errorPage: {\n subtitle: 'ERROR {{status}}: {{statusMessage}}',\n title: 'Looks like someone dropped the mic!',\n goBack: 'Go back',\n showMoreDetails: 'Show more details',\n showLessDetails: 'Show less details',\n },\n emptyState: {\n missingAnnotation: {\n title: 'Missing Annotation',\n actionTitle:\n 'Add the annotation to your component YAML as shown in the highlighted example below:',\n readMore: 'Read more',\n },\n },\n supportConfig: {\n default: {\n title: 'Support Not Configured',\n linkTitle: 'Add `app.support` config key',\n },\n },\n errorBoundary: {\n title: 'Please contact {{slackChannel}} for help.',\n },\n oauthRequestDialog: {\n title: 'Login Required',\n authRedirectTitle: 'This will trigger a http redirect to OAuth Login.',\n login: 'Log in',\n rejectAll: 'Reject All',\n message:\n 'Sign-in to allow {{appTitle}} access to {{provider}} APIs and identities.',\n },\n supportButton: {\n title: 'Support',\n close: 'Close',\n },\n table: {\n filter: {\n title: 'Filters',\n clearAll: 'Clear all',\n placeholder: 'All results',\n },\n body: {\n emptyDataSourceMessage: 'No records to display',\n },\n pagination: {\n firstTooltip: 'First Page',\n labelDisplayedRows: '{from}-{to} of {count}',\n labelRowsSelect: 'rows',\n lastTooltip: 'Last Page',\n nextTooltip: 'Next Page',\n previousTooltip: 'Previous Page',\n },\n toolbar: {\n search: 'Filter',\n },\n header: {\n actions: 'Actions',\n },\n },\n alertDisplay: {\n message_one: '({{ count }} newer message)',\n message_other: '({{ count }} newer messages)',\n },\n autoLogout: {\n stillTherePrompt: {\n title: 'Logging out due to inactivity',\n buttonText: \"Yes! Don't log me out\",\n },\n },\n dependencyGraph: {\n fullscreenTooltip: 'Toggle fullscreen',\n },\n proxiedSignInPage: {\n title:\n 'You do not appear to be signed in. Please try reloading the browser page.',\n },\n logViewer: {\n downloadBtn: {\n tooltip: 'Download logs',\n },\n copyBtn: {\n tooltip: 'Copy logs to clipboard',\n },\n searchField: {\n placeholder: 'Search',\n },\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,+BAA+B,oBAAA,CAAqB;AAAA,EAC/D,EAAA,EAAI,iBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,KAAA,EAAO,SAAA;AAAA,MACP,WAAA,EAAa,cAAA;AAAA,MACb,cAAA,EAAgB;AAAA,QACd,KAAA,EAAO,aAAA;AAAA,QACP,QAAA,EACE,8EAAA;AAAA,QACF,MAAA,EAAQ,SAAA;AAAA,QACR,YAAA,EAAc,+CAAA;AAAA,QACd,QAAA,EAAU,UAAA;AAAA,QACV,OAAA,EAAS;AAAA,OACX;AAAA,MACA,aAAA,EAAe;AAAA,QACb,KAAA,EAAO,OAAA;AAAA,QACP,QAAA,EACE,6GAAA;AAAA,QACF,KAAA,EAAO;AAAA;AACT,KACF;AAAA,IACA,aAAA,EAAe,iBAAA;AAAA,IACf,cAAA,EAAgB;AAAA,MACd,WAAA,EAAa;AAAA,KACf;AAAA,IACA,aAAA,EAAe;AAAA,MACb,KAAA,EAAO,OAAA;AAAA,MACP,MAAA,EAAQ,QAAA;AAAA,MACR,IAAA,EAAM,MAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,IAAA,EAAM;AAAA,KACR;AAAA,IACA,SAAA,EAAW;AAAA,MACT,QAAA,EAAU,qCAAA;AAAA,MACV,KAAA,EAAO,qCAAA;AAAA,MACP,MAAA,EAAQ,SAAA;AAAA,MACR,eAAA,EAAiB,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,EAAe;AAAA,KACjB;AAAA,IACA,UAAA,EAAY;AAAA,MACV,gBAAA,EAAkB;AAAA,QAChB,KAAA,EAAO,+BAAA;AAAA,QACP,UAAA,EAAY;AAAA;AACd,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,iBAAA,EAAmB;AAAA,KACrB;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EACE;AAAA,KACJ;AAAA,IACA,SAAA,EAAW;AAAA,MACT,WAAA,EAAa;AAAA,QACX,OAAA,EAAS;AAAA,OACX;AAAA,MACA,OAAA,EAAS;AAAA,QACP,OAAA,EAAS;AAAA,OACX;AAAA,MACA,WAAA,EAAa;AAAA,QACX,WAAA,EAAa;AAAA;AACf;AACF;AAEJ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/core-components",
|
|
3
|
-
"version": "0.18.14-next.
|
|
3
|
+
"version": "0.18.14-next.1",
|
|
4
4
|
"description": "Core components used by Backstage plugins and apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library"
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@backstage/config": "1.3.8",
|
|
70
|
-
"@backstage/core-plugin-api": "1.12.
|
|
70
|
+
"@backstage/core-plugin-api": "1.12.10-next.0",
|
|
71
71
|
"@backstage/errors": "1.3.1",
|
|
72
72
|
"@backstage/theme": "0.7.3",
|
|
73
|
-
"@backstage/ui": "0.
|
|
73
|
+
"@backstage/ui": "0.18.0-next.1",
|
|
74
74
|
"@backstage/version-bridge": "1.0.12",
|
|
75
75
|
"@dagrejs/dagre": "^1.1.4",
|
|
76
76
|
"@date-io/core": "^1.3.13",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"@material-ui/icons": "^4.9.1",
|
|
80
80
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
81
81
|
"@react-hookz/web": "^24.0.0",
|
|
82
|
+
"@testing-library/dom": "^10.0.0",
|
|
82
83
|
"@testing-library/react": "^16.0.0",
|
|
83
84
|
"@types/react-sparklines": "^1.7.0",
|
|
84
85
|
"ansi-regex": "^6.0.1",
|
|
@@ -111,11 +112,10 @@
|
|
|
111
112
|
"zod": "^3.25.76 || ^4.0.0"
|
|
112
113
|
},
|
|
113
114
|
"devDependencies": {
|
|
114
|
-
"@backstage/app-defaults": "1.7.12-next.
|
|
115
|
+
"@backstage/app-defaults": "1.7.12-next.1",
|
|
115
116
|
"@backstage/cli": "0.36.6-next.0",
|
|
116
|
-
"@backstage/core-app-api": "1.20.5-next.
|
|
117
|
-
"@backstage/test-utils": "1.7.22-next.
|
|
118
|
-
"@testing-library/dom": "^10.0.0",
|
|
117
|
+
"@backstage/core-app-api": "1.20.5-next.1",
|
|
118
|
+
"@backstage/test-utils": "1.7.22-next.1",
|
|
119
119
|
"@testing-library/jest-dom": "^6.0.0",
|
|
120
120
|
"@testing-library/user-event": "^14.0.0",
|
|
121
121
|
"@types/ansi-regex": "^5.0.0",
|