@techdocs/cli 1.5.0-next.1 → 1.5.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/1032.96cef90d.chunk.js +5 -0
- package/dist/embedded-app/static/1032.96cef90d.chunk.js.map +1 -0
- package/dist/embedded-app/static/1105.ac144a87.chunk.js +5 -0
- package/dist/embedded-app/static/1105.ac144a87.chunk.js.map +1 -0
- package/dist/embedded-app/static/184.5623ac15.chunk.js +5 -0
- package/dist/embedded-app/static/184.5623ac15.chunk.js.map +1 -0
- package/dist/embedded-app/static/2440.240e2610.chunk.js +5 -0
- package/dist/embedded-app/static/2440.240e2610.chunk.js.map +1 -0
- package/dist/embedded-app/static/2924.b757596e.chunk.js +3 -0
- package/dist/embedded-app/static/2924.b757596e.chunk.js.map +1 -0
- package/dist/embedded-app/static/3487.bf80060c.chunk.js +5 -0
- package/dist/embedded-app/static/3487.bf80060c.chunk.js.map +1 -0
- package/dist/embedded-app/static/3893.0eb40023.chunk.js +3 -0
- package/dist/embedded-app/static/3893.0eb40023.chunk.js.map +1 -0
- package/dist/embedded-app/static/4966.9cb67949.chunk.js +49 -0
- package/dist/embedded-app/static/4966.9cb67949.chunk.js.map +1 -0
- package/dist/embedded-app/static/5458.f510f1d2.chunk.js +5 -0
- package/dist/embedded-app/static/5458.f510f1d2.chunk.js.map +1 -0
- package/dist/embedded-app/static/5877.fa5d49bb.chunk.js +6 -0
- package/dist/embedded-app/static/5877.fa5d49bb.chunk.js.map +1 -0
- package/dist/embedded-app/static/5914.412625b0.chunk.js +3 -0
- package/dist/embedded-app/static/5914.412625b0.chunk.js.map +1 -0
- package/dist/embedded-app/static/6051.5b06b988.chunk.js +4 -0
- package/dist/embedded-app/static/{6051.e6ab645f.chunk.js.map → 6051.5b06b988.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7670.dce585cd.chunk.js +3 -0
- package/dist/embedded-app/static/{7670.714e8960.chunk.js.map → 7670.dce585cd.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7750.f3e35b68.chunk.js +8 -0
- package/dist/embedded-app/static/7750.f3e35b68.chunk.js.map +1 -0
- package/dist/embedded-app/static/7893.67e0b03f.chunk.js +3 -0
- package/dist/embedded-app/static/7893.67e0b03f.chunk.js.map +1 -0
- package/dist/embedded-app/static/8629.18b8b029.chunk.js +7 -0
- package/dist/embedded-app/static/8629.18b8b029.chunk.js.map +1 -0
- package/dist/embedded-app/static/8662.e8af541f.chunk.js +3 -0
- package/dist/embedded-app/static/8662.e8af541f.chunk.js.map +1 -0
- package/dist/embedded-app/static/8951.b8daca92.chunk.js +3 -0
- package/dist/embedded-app/static/8951.b8daca92.chunk.js.map +1 -0
- package/dist/embedded-app/static/9545.3ea2318c.chunk.js +5 -0
- package/dist/embedded-app/static/9545.3ea2318c.chunk.js.map +1 -0
- package/dist/embedded-app/static/9598.c8137318.chunk.js +3 -0
- package/dist/embedded-app/static/9598.c8137318.chunk.js.map +1 -0
- package/dist/embedded-app/static/967.c3c74dec.chunk.js +15 -0
- package/dist/embedded-app/static/967.c3c74dec.chunk.js.map +1 -0
- package/dist/embedded-app/static/9770.18f87a62.chunk.js +5 -0
- package/dist/embedded-app/static/9770.18f87a62.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.6e8bb883.js +487 -0
- package/dist/embedded-app/static/main.6e8bb883.js.map +1 -0
- package/dist/embedded-app/static/module-i18next.b10d0f28.js +3 -0
- package/dist/embedded-app/static/module-i18next.b10d0f28.js.map +1 -0
- package/dist/embedded-app/static/module-lodash.8166f005.js +29 -0
- package/dist/embedded-app/static/module-lodash.8166f005.js.map +1 -0
- package/dist/embedded-app/static/{module-material-table.1d463a12.js → module-material-table.0f5635dd.js} +2 -2
- package/dist/embedded-app/static/{module-material-table.1d463a12.js.map → module-material-table.0f5635dd.js.map} +1 -1
- package/dist/embedded-app/static/module-material-ui.1b712255.js +24 -0
- package/dist/embedded-app/static/module-material-ui.1b712255.js.map +1 -0
- package/dist/embedded-app/static/{module-react-beautiful-dnd.ad887878.js → module-react-beautiful-dnd.62627182.js} +2 -2
- package/dist/embedded-app/static/{module-react-beautiful-dnd.ad887878.js.map → module-react-beautiful-dnd.62627182.js.map} +1 -1
- package/dist/embedded-app/static/{module-react-dom.bd3fd0c6.js → module-react-dom.07625e59.js} +1 -1
- package/dist/embedded-app/static/{module-react-dom.bd3fd0c6.js.map → module-react-dom.07625e59.js.map} +1 -1
- package/dist/embedded-app/static/module-react-router-dom.a0f835fd.js +22 -0
- package/dist/embedded-app/static/module-react-router-dom.a0f835fd.js.map +1 -0
- package/dist/embedded-app/static/module-react-router.8e9755f1.js +22 -0
- package/dist/embedded-app/static/module-react-router.8e9755f1.js.map +1 -0
- package/dist/embedded-app/static/module-zod.c74c6842.js +3 -0
- package/dist/embedded-app/static/module-zod.c74c6842.js.map +1 -0
- package/dist/embedded-app/static/{runtime.4dd3806f.js → runtime.6e8bb883.js} +2 -2
- package/dist/embedded-app/static/runtime.6e8bb883.js.map +1 -0
- package/dist/embedded-app/static/vendor.6e8bb883.js +159 -0
- package/dist/embedded-app/static/vendor.6e8bb883.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +6 -6
- package/dist/embedded-app/static/1032.f8378b05.chunk.js +0 -3
- package/dist/embedded-app/static/1032.f8378b05.chunk.js.map +0 -1
- package/dist/embedded-app/static/1049.e59b8f46.chunk.js +0 -7
- package/dist/embedded-app/static/1049.e59b8f46.chunk.js.map +0 -1
- package/dist/embedded-app/static/1105.a5f2c603.chunk.js +0 -3
- package/dist/embedded-app/static/1105.a5f2c603.chunk.js.map +0 -1
- package/dist/embedded-app/static/184.2d07d6cf.chunk.js +0 -3
- package/dist/embedded-app/static/184.2d07d6cf.chunk.js.map +0 -1
- package/dist/embedded-app/static/2440.c513a311.chunk.js +0 -3
- package/dist/embedded-app/static/2440.c513a311.chunk.js.map +0 -1
- package/dist/embedded-app/static/5458.f60ece35.chunk.js +0 -3
- package/dist/embedded-app/static/5458.f60ece35.chunk.js.map +0 -1
- package/dist/embedded-app/static/6051.e6ab645f.chunk.js +0 -4
- package/dist/embedded-app/static/732.b079cbc6.chunk.js +0 -3
- package/dist/embedded-app/static/732.b079cbc6.chunk.js.map +0 -1
- package/dist/embedded-app/static/7560.12e04146.chunk.js +0 -3
- package/dist/embedded-app/static/7560.12e04146.chunk.js.map +0 -1
- package/dist/embedded-app/static/7670.714e8960.chunk.js +0 -3
- package/dist/embedded-app/static/7750.10e99997.chunk.js +0 -8
- package/dist/embedded-app/static/7750.10e99997.chunk.js.map +0 -1
- package/dist/embedded-app/static/8951.bff6b400.chunk.js +0 -3
- package/dist/embedded-app/static/8951.bff6b400.chunk.js.map +0 -1
- package/dist/embedded-app/static/9323.dd670d43.chunk.js +0 -3
- package/dist/embedded-app/static/9323.dd670d43.chunk.js.map +0 -1
- package/dist/embedded-app/static/9545.24f95d89.chunk.js +0 -3
- package/dist/embedded-app/static/9545.24f95d89.chunk.js.map +0 -1
- package/dist/embedded-app/static/9770.2fa7c11e.chunk.js +0 -3
- package/dist/embedded-app/static/9770.2fa7c11e.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.4dd3806f.js +0 -522
- package/dist/embedded-app/static/main.4dd3806f.js.map +0 -1
- package/dist/embedded-app/static/module-ajv.be583887.js +0 -10
- package/dist/embedded-app/static/module-ajv.be583887.js.map +0 -1
- package/dist/embedded-app/static/module-lodash.4c9a1319.js +0 -29
- package/dist/embedded-app/static/module-lodash.4c9a1319.js.map +0 -1
- package/dist/embedded-app/static/module-luxon.a1854eb9.js +0 -3
- package/dist/embedded-app/static/module-luxon.a1854eb9.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.1afbaa53.js +0 -51
- package/dist/embedded-app/static/module-material-ui.1afbaa53.js.map +0 -1
- package/dist/embedded-app/static/module-octokit.7416db07.js +0 -5
- package/dist/embedded-app/static/module-octokit.7416db07.js.map +0 -1
- package/dist/embedded-app/static/module-react-router-dom.ef191c8f.js +0 -21
- package/dist/embedded-app/static/module-react-router-dom.ef191c8f.js.map +0 -1
- package/dist/embedded-app/static/module-react-router.d2e96318.js +0 -21
- package/dist/embedded-app/static/module-react-router.d2e96318.js.map +0 -1
- package/dist/embedded-app/static/module-yaml.aace0584.js +0 -139
- package/dist/embedded-app/static/module-yaml.aace0584.js.map +0 -1
- package/dist/embedded-app/static/module-zod.49079951.js +0 -3
- package/dist/embedded-app/static/module-zod.49079951.js.map +0 -1
- package/dist/embedded-app/static/runtime.4dd3806f.js.map +0 -1
- package/dist/embedded-app/static/vendor.4dd3806f.js +0 -213
- package/dist/embedded-app/static/vendor.4dd3806f.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/6051.e6ab645f.chunk.js","mappings":"6UAkBA,MAAMA,KAAYC,EAAAA,GAAe,EAC3BC,EAAe,SAGfC,EAAgBC,OAAOC,YAC3BD,OAAOE,QAAQ,CACb,EAAGC,IAAM,CAAE,GAAGA,EAAGC,KAAM,EAAK,GAC5B,EAAGD,IAAM,CAAE,GAAGA,EAAGE,OAAQ,EAAK,GAC9B,EAAGF,IAAM,CAAE,GAAGA,EAAGG,UAAW,EAAK,GACjC,GAAI,CAAC,CAAEF,KAAMG,EAAG,GAAGJ,CAAE,IAAMA,EAC3B,GAAI,CAAC,CAAEE,OAAQE,EAAG,GAAGJ,CAAE,IAAMA,EAC7B,GAAI,CAAC,CAAEG,UAAWC,EAAG,GAAGJ,CAAE,IAAMA,EAChC,GAAIA,IAAM,CAAE,GAAGA,EAAGK,WAAY,OAAQ,GACtC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,KAAM,GACpC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,OAAQ,GACtC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,QAAS,GACvC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,MAAO,GACrC,GAA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QzB,WACnBsF,QAASP,GAASgI,EAAiB/M,EAAY+E,CAAK,EACpDgB,WAAYhB,GAASgI,EAAiB/M,EAAY+E,CAAK,E,SAEtD/E,C,MAEH,OAAC8D,GAAOA,CACN1C,KAAMA,EACNK,QAASA,EACTU,WAAYmK,EAAOnK,WACnB4B,qBACEuI,EAAOvB,aAAe/K,EAClBsM,EAAOtB,gBACP/I,M,KAKd,C,OAMZ,C","sources":["webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/AnsiProcessor.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/LogLine.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/LogViewerControls.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/styles.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/useLogViewerSearch.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/useLogViewerSelection.tsx","webpack://techdocs-cli-embedded-app/../core-components/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 ansiRegexMaker from 'ansi-regex';\n\nconst ansiRegex = ansiRegexMaker();\nconst newlineRegex = /\\n\\r?/g;\n\n// A mapping of how each escape code changes the modifiers\nconst codeModifiers = Object.fromEntries(\n Object.entries({\n 1: m => ({ ...m, bold: true }),\n 3: m => ({ ...m, italic: true }),\n 4: m => ({ ...m, underline: true }),\n 22: ({ bold: _, ...m }) => m,\n 23: ({ italic: _, ...m }) => m,\n 24: ({ underline: _, ...m }) => m,\n 30: m => ({ ...m, foreground: 'black' }),\n 31: m => ({ ...m, foreground: 'red' }),\n 32: m => ({ ...m, foreground: 'green' }),\n 33: m => ({ ...m, foreground: 'yellow' }),\n 34: m => ({ ...m, foreground: 'blue' }),\n 35: m => ({ ...m, foreground: 'magenta' }),\n 36: m => ({ ...m, foreground: 'cyan' }),\n 37: m => ({ ...m, foreground: 'white' }),\n 39: ({ foreground: _, ...m }) => m,\n 90: m => ({ ...m, foreground: 'grey' }),\n 40: m => ({ ...m, background: 'black' }),\n 41: m => ({ ...m, background: 'red' }),\n 42: m => ({ ...m, background: 'green' }),\n 43: m => ({ ...m, background: 'yellow' }),\n 44: m => ({ ...m, background: 'blue' }),\n 45: m => ({ ...m, background: 'magenta' }),\n 46: m => ({ ...m, background: 'cyan' }),\n 47: m => ({ ...m, background: 'white' }),\n 49: ({ background: _, ...m }) => m,\n } as Record<string, (m: ChunkModifiers) => ChunkModifiers>).map(\n ([code, modifier]) => [`\\x1b[${code}m`, modifier],\n ),\n);\n\nexport type AnsiColor =\n | 'black'\n | 'red'\n | 'green'\n | 'yellow'\n | 'blue'\n | 'magenta'\n | 'cyan'\n | 'white'\n | 'grey';\n\nexport interface ChunkModifiers {\n foreground?: AnsiColor;\n background?: AnsiColor;\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n}\n\nexport interface AnsiChunk {\n text: string;\n modifiers: ChunkModifiers;\n}\n\nexport class AnsiLine {\n text: string;\n\n constructor(\n readonly lineNumber: number = 1,\n readonly chunks: AnsiChunk[] = [],\n ) {\n this.text = chunks\n .map(c => c.text)\n .join('')\n .toLocaleLowerCase('en-US');\n }\n\n lastChunk(): AnsiChunk | undefined {\n return this.chunks[this.chunks.length - 1];\n }\n\n replaceLastChunk(newChunks?: AnsiChunk[]) {\n if (newChunks) {\n this.chunks.splice(this.chunks.length - 1, 1, ...newChunks);\n this.text = this.chunks\n .map(c => c.text)\n .join('')\n .toLocaleLowerCase('en-US');\n }\n }\n}\n\nexport class AnsiProcessor {\n private text: string = '';\n private lines: AnsiLine[] = [];\n\n /**\n * Processes a chunk of text while keeping internal state that optimizes\n * subsequent processing that appends to the text.\n */\n process(text: string): AnsiLine[] {\n if (this.text === text) {\n return this.lines;\n }\n\n if (text.startsWith(this.text)) {\n const lastLineIndex = this.lines.length > 0 ? this.lines.length - 1 : 0;\n const lastLine = this.lines[lastLineIndex] ?? new AnsiLine();\n const lastChunk = lastLine.lastChunk();\n\n const newLines = this.processLines(\n (lastChunk?.text ?? '') + text.slice(this.text.length),\n lastChunk?.modifiers,\n lastLine?.lineNumber,\n );\n lastLine.replaceLastChunk(newLines[0]?.chunks);\n\n this.lines[lastLineIndex] = lastLine;\n this.lines.push(...newLines.slice(1));\n } else {\n this.lines = this.processLines(text);\n }\n this.text = text;\n\n return this.lines;\n }\n\n // Split a chunk of text up into lines and process each line individually\n private processLines = (\n text: string,\n modifiers: ChunkModifiers = {},\n startingLineNumber: number = 1,\n ): AnsiLine[] => {\n const lines: AnsiLine[] = [];\n\n let currentModifiers = modifiers;\n let currentLineNumber = startingLineNumber;\n\n let prevIndex = 0;\n newlineRegex.lastIndex = 0;\n for (;;) {\n const match = newlineRegex.exec(text);\n if (!match) {\n const chunks = this.processText(\n text.slice(prevIndex),\n currentModifiers,\n );\n lines.push(new AnsiLine(currentLineNumber, chunks));\n return lines;\n }\n\n const line = text.slice(prevIndex, match.index);\n prevIndex = match.index + match[0].length;\n\n const chunks = this.processText(line, currentModifiers);\n lines.push(new AnsiLine(currentLineNumber, chunks));\n\n // Modifiers that are active in the last chunk are carried over to the next line\n currentModifiers =\n chunks[chunks.length - 1].modifiers ?? currentModifiers;\n currentLineNumber += 1;\n }\n };\n\n // Processing of a one individual text chunk\n private processText = (\n fullText: string,\n modifiers: ChunkModifiers,\n ): AnsiChunk[] => {\n const chunks: AnsiChunk[] = [];\n\n let currentModifiers = modifiers;\n\n let prevIndex = 0;\n ansiRegex.lastIndex = 0;\n for (;;) {\n const match = ansiRegex.exec(fullText);\n if (!match) {\n chunks.push({\n text: fullText.slice(prevIndex),\n modifiers: currentModifiers,\n });\n return chunks;\n }\n\n const text = fullText.slice(prevIndex, match.index);\n chunks.push({ text, modifiers: currentModifiers });\n\n // For every escape code that we encounter we keep track of where the\n // next chunk of text starts, and what modifiers it has\n prevIndex = match.index + match[0].length;\n currentModifiers = this.processCode(match[0], currentModifiers);\n }\n };\n\n private processCode = (\n code: string,\n modifiers: ChunkModifiers,\n ): ChunkModifiers => {\n return codeModifiers[code]?.(modifiers) ?? modifiers;\n };\n}\n","/*\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 React, { useMemo } from 'react';\nimport { AnsiChunk, AnsiLine, ChunkModifiers } from './AnsiProcessor';\nimport startCase from 'lodash/startCase';\nimport classnames from 'classnames';\nimport { useStyles } from './styles';\nimport Linkify from 'linkify-react';\nimport { Link } from '../Link';\n\nexport function getModifierClasses(\n classes: ReturnType<typeof useStyles>,\n modifiers: ChunkModifiers,\n) {\n const classNames = new Array<string>();\n if (modifiers.bold) {\n classNames.push(classes.modifierBold);\n }\n if (modifiers.italic) {\n classNames.push(classes.modifierItalic);\n }\n if (modifiers.underline) {\n classNames.push(classes.modifierUnderline);\n }\n if (modifiers.foreground) {\n const key = `modifierForeground${startCase(\n modifiers.foreground,\n )}` as keyof typeof classes;\n classNames.push(classes[key]);\n }\n if (modifiers.background) {\n const key = `modifierBackground${startCase(\n modifiers.background,\n )}` as keyof typeof classes;\n classNames.push(classes[key]);\n }\n return classNames.length > 0 ? classNames.join(' ') : undefined;\n}\n\nexport function findSearchResults(text: string, searchText: string) {\n if (!searchText || !text.includes(searchText)) {\n return undefined;\n }\n const searchResults = new Array<{ start: number; end: number }>();\n let offset = 0;\n for (;;) {\n const start = text.indexOf(searchText, offset);\n if (start === -1) {\n break;\n }\n const end = start + searchText.length;\n searchResults.push({ start, end });\n offset = end;\n }\n return searchResults;\n}\n\nexport interface HighlightAnsiChunk extends AnsiChunk {\n highlight?: number;\n}\n\nexport function calculateHighlightedChunks(\n line: AnsiLine,\n searchText: string,\n): HighlightAnsiChunk[] {\n const results = findSearchResults(line.text, searchText);\n if (!results) {\n return line.chunks;\n }\n\n const chunks = new Array<HighlightAnsiChunk>();\n\n let lineOffset = 0;\n let resultIndex = 0;\n let result = results[resultIndex];\n for (const chunk of line.chunks) {\n const { text, modifiers } = chunk;\n if (!result || lineOffset + text.length < result.start) {\n chunks.push(chunk);\n lineOffset += text.length;\n continue;\n }\n\n let localOffset = 0;\n while (result) {\n const localStart = Math.max(result.start - lineOffset, 0);\n if (localStart > text.length) {\n break; // The next result is not in this chunk\n }\n\n const localEnd = Math.min(result.end - lineOffset, text.length);\n\n const hasTextBeforeResult = localStart > localOffset;\n if (hasTextBeforeResult) {\n chunks.push({ text: text.slice(localOffset, localStart), modifiers });\n }\n const hasResultText = localEnd > localStart;\n if (hasResultText) {\n chunks.push({\n modifiers,\n highlight: resultIndex,\n text: text.slice(localStart, localEnd),\n });\n }\n\n localOffset = localEnd;\n\n const foundCompleteResult = result.end - lineOffset === localEnd;\n if (foundCompleteResult) {\n resultIndex += 1;\n result = results[resultIndex];\n } else {\n break; // The rest of the result is in the following chunks\n }\n }\n\n const hasTextAfterResult = localOffset < text.length;\n if (hasTextAfterResult) {\n chunks.push({ text: text.slice(localOffset), modifiers });\n }\n\n lineOffset += text.length;\n }\n\n return chunks;\n}\n\nconst renderLink = ({\n attributes,\n content,\n}: {\n attributes: { [attr: string]: any };\n content: string;\n}) => {\n const { href, ...props } = attributes;\n return (\n <Link to={href} {...props}>\n {content}\n </Link>\n );\n};\n\nexport interface LogLineProps {\n line: AnsiLine;\n classes: ReturnType<typeof useStyles>;\n searchText: string;\n highlightResultIndex?: number;\n}\n\nexport function LogLine({\n line,\n classes,\n searchText,\n highlightResultIndex,\n}: LogLineProps) {\n const chunks = useMemo(\n () => calculateHighlightedChunks(line, searchText),\n [line, searchText],\n );\n\n const elements = useMemo(\n () =>\n chunks.map(({ text, modifiers, highlight }, index) => (\n // eslint-disable-next-line react/forbid-elements\n <span\n key={index}\n className={classnames(\n getModifierClasses(classes, modifiers),\n highlight !== undefined &&\n (highlight === highlightResultIndex\n ? classes.textSelectedHighlight\n : classes.textHighlight),\n )}\n >\n <Linkify options={{ render: renderLink }}>{text}</Linkify>\n </span>\n )),\n [chunks, highlightResultIndex, classes],\n );\n\n return <>{elements}</>;\n}\n","/*\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 React from 'react';\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 { LogViewerSearch } from './useLogViewerSearch';\n\nexport interface LogViewerControlsProps extends LogViewerSearch {}\n\nexport function LogViewerControls(props: LogViewerControlsProps) {\n const { resultCount, resultIndexStep, toggleShouldFilter } = props;\n const resultIndex = props.resultIndex ?? 0;\n\n const handleKeyPress = (event: React.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=\"Search\"\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 </>\n );\n}\n","/*\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 { alpha, makeStyles } from '@material-ui/core/styles';\nimport * as colors from '@material-ui/core/colors';\n\nexport const HEADER_SIZE = 40;\n\n/** @public Class keys for overriding LogViewer styles */\nexport type LogViewerClassKey =\n | 'root'\n | 'header'\n | 'log'\n | 'line'\n | 'lineSelected'\n | 'lineCopyButton'\n | 'lineNumber'\n | 'textHighlight'\n | 'textSelectedHighlight'\n | 'modifierBold'\n | 'modifierItalic'\n | 'modifierUnderline'\n | 'modifierForegroundBlack'\n | 'modifierForegroundRed'\n | 'modifierForegroundGreen'\n | 'modifierForegroundYellow'\n | 'modifierForegroundBlue'\n | 'modifierForegroundMagenta'\n | 'modifierForegroundCyan'\n | 'modifierForegroundWhite'\n | 'modifierForegroundGrey'\n | 'modifierBackgroundBlack'\n | 'modifierBackgroundRed'\n | 'modifierBackgroundGreen'\n | 'modifierBackgroundYellow'\n | 'modifierBackgroundBlue'\n | 'modifierBackgroundMagenta'\n | 'modifierBackgroundCyan'\n | 'modifierBackgroundWhite'\n | 'modifierBackgroundGrey';\n\nexport const useStyles = makeStyles(\n theme => ({\n root: {\n background: theme.palette.background.paper,\n },\n header: {\n height: HEADER_SIZE,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n log: {\n fontFamily: '\"Monaco\", monospace',\n fontSize: theme.typography.pxToRem(12),\n },\n line: {\n position: 'relative',\n whiteSpace: 'pre',\n\n '&:hover': {\n background: theme.palette.action.hover,\n },\n },\n lineSelected: {\n background: theme.palette.action.selected,\n\n '&:hover': {\n background: theme.palette.action.selected,\n },\n },\n lineCopyButton: {\n position: 'absolute',\n paddingTop: 0,\n paddingBottom: 0,\n },\n lineNumber: {\n display: 'inline-block',\n textAlign: 'end',\n width: 60,\n marginRight: theme.spacing(1),\n cursor: 'pointer',\n },\n textHighlight: {\n background: alpha(theme.palette.info.main, 0.15),\n },\n textSelectedHighlight: {\n background: alpha(theme.palette.info.main, 0.4),\n },\n modifierBold: {\n fontWeight: theme.typography.fontWeightBold,\n },\n modifierItalic: {\n fontStyle: 'italic',\n },\n modifierUnderline: {\n textDecoration: 'underline',\n },\n modifierForegroundBlack: {\n color: colors.common.black,\n },\n modifierForegroundRed: {\n color: colors.red[500],\n },\n modifierForegroundGreen: {\n color: colors.green[500],\n },\n modifierForegroundYellow: {\n color: colors.yellow[500],\n },\n modifierForegroundBlue: {\n color: colors.blue[500],\n },\n modifierForegroundMagenta: {\n color: colors.purple[500],\n },\n modifierForegroundCyan: {\n color: colors.cyan[500],\n },\n modifierForegroundWhite: {\n color: colors.common.white,\n },\n modifierForegroundGrey: {\n color: colors.grey[500],\n },\n modifierBackgroundBlack: {\n background: colors.common.black,\n },\n modifierBackgroundRed: {\n background: colors.red[500],\n },\n modifierBackgroundGreen: {\n background: colors.green[500],\n },\n modifierBackgroundYellow: {\n background: colors.yellow[500],\n },\n modifierBackgroundBlue: {\n background: colors.blue[500],\n },\n modifierBackgroundMagenta: {\n background: colors.purple[500],\n },\n modifierBackgroundCyan: {\n background: colors.cyan[500],\n },\n modifierBackgroundWhite: {\n background: colors.common.white,\n },\n modifierBackgroundGrey: {\n background: colors.grey[500],\n },\n }),\n { name: 'BackstageLogViewer' },\n);\n","/*\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 { useMemo, useState } from 'react';\nimport { useToggle } from '@react-hookz/web';\nimport { AnsiLine } from './AnsiProcessor';\n\nexport function applySearchFilter(lines: AnsiLine[], searchText: string) {\n if (!searchText) {\n return { lines };\n }\n\n const matchingLines = [];\n const searchResults = [];\n for (const line of lines) {\n if (line.text.includes(searchText)) {\n matchingLines.push(line);\n\n let offset = 0;\n let lineResultIndex = 0;\n for (;;) {\n const start = line.text.indexOf(searchText, offset);\n if (start === -1) {\n break;\n }\n searchResults.push({\n lineNumber: line.lineNumber,\n lineIndex: lineResultIndex++,\n });\n offset = start + searchText.length;\n }\n }\n }\n\n return {\n lines: matchingLines,\n results: searchResults,\n };\n}\n\nexport interface LogViewerSearch {\n lines: AnsiLine[];\n\n searchText: string;\n searchInput: string;\n setSearchInput: (searchInput: string) => void;\n\n shouldFilter: boolean;\n toggleShouldFilter: () => void;\n\n resultCount: number | undefined;\n resultIndex: number | undefined;\n resultIndexStep: (decrement?: boolean) => void;\n\n resultLine: number | undefined;\n resultLineIndex: number | undefined;\n}\n\nexport function useLogViewerSearch(lines: AnsiLine[]): LogViewerSearch {\n const [searchInput, setSearchInput] = useState('');\n const searchText = searchInput.toLocaleLowerCase('en-US');\n\n const [resultIndex, setResultIndex] = useState<number>(0);\n\n const [shouldFilter, toggleShouldFilter] = useToggle(false);\n\n const filter = useMemo(\n () => applySearchFilter(lines, searchText),\n [lines, searchText],\n );\n\n const searchResult = filter.results\n ? filter.results[Math.min(resultIndex, filter.results.length - 1)]\n : undefined;\n const resultCount = filter.results?.length;\n\n const resultIndexStep = (decrement?: boolean) => {\n if (decrement) {\n if (resultCount !== undefined) {\n const next = Math.min(resultIndex - 1, resultCount - 2);\n setResultIndex(next < 0 ? resultCount - 1 : next);\n }\n } else {\n if (resultCount !== undefined) {\n const next = resultIndex + 1;\n setResultIndex(next >= resultCount ? 0 : next);\n }\n }\n };\n\n return {\n lines: shouldFilter ? filter.lines : lines,\n searchText,\n searchInput,\n setSearchInput,\n shouldFilter,\n toggleShouldFilter,\n resultCount,\n resultIndex,\n resultIndexStep,\n resultLine: searchResult?.lineNumber,\n resultLineIndex: searchResult?.lineIndex,\n };\n}\n","/*\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 { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useEffect, useState } from 'react';\nimport useCopyToClipboard from 'react-use/lib/useCopyToClipboard';\nimport { AnsiLine } from './AnsiProcessor';\n\nexport function useLogViewerSelection(lines: AnsiLine[]) {\n const errorApi = useApi(errorApiRef);\n const [sel, setSelection] = useState<{ start: number; end: number }>();\n const start = sel ? Math.min(sel.start, sel.end) : undefined;\n const end = sel ? Math.max(sel.start, sel.end) : undefined;\n\n const [{ error }, copyToClipboard] = useCopyToClipboard();\n\n useEffect(() => {\n if (error) {\n errorApi.post(error);\n }\n }, [error, errorApi]);\n\n return {\n shouldShowButton(line: number) {\n return start === line || end === line;\n },\n isSelected(line: number) {\n if (!sel) {\n return false;\n }\n return start! <= line && line <= end!;\n },\n setSelection(line: number, add: boolean) {\n if (add) {\n setSelection(s =>\n s ? { start: s.start, end: line } : { start: line, end: line },\n );\n } else {\n setSelection(s =>\n s?.start === line && s?.end === line\n ? undefined\n : { start: line, end: line },\n );\n }\n },\n copySelection() {\n if (sel) {\n const copyText = lines\n .slice(Math.min(sel.start, sel.end) - 1, Math.max(sel.start, sel.end))\n .map(l => l.chunks.map(c => c.text).join(''))\n .join('\\n');\n copyToClipboard(copyText);\n setSelection(undefined);\n }\n },\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport 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 React, { useEffect, useMemo, useRef } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { FixedSizeList } from 'react-window';\n\nimport { 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';\n\nexport interface RealLogViewerProps {\n text: string;\n classes?: { root?: string };\n}\n\nexport function RealLogViewer(props: RealLogViewerProps) {\n const classes = useStyles({ classes: props.classes });\n const listRef = useRef<FixedSizeList | null>(null);\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\n const search = useLogViewerSearch(lines);\n const selection = useLogViewerSelection(lines);\n const location = useLocation();\n\n useEffect(() => {\n if (search.resultLine !== undefined && listRef.current) {\n listRef.current.scrollToItem(search.resultLine - 1, 'center');\n }\n }, [search.resultLine]);\n\n useEffect(() => {\n if (location.hash) {\n // #line-6 -> 6\n const line = parseInt(location.hash.replace(/\\D/g, ''), 10);\n selection.setSelection(line, false);\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleSelectLine = (\n line: number,\n event: { shiftKey: boolean; preventDefault: () => void },\n ) => {\n selection.setSelection(line, event.shiftKey);\n };\n\n return (\n <AutoSizer>\n {({ height, width }) => (\n <Box style={{ width, height }} className={classes.root}>\n <Box className={classes.header}>\n <LogViewerControls {...search} />\n </Box>\n <FixedSizeList\n ref={listRef}\n className={classes.log}\n height={(height || 480) - HEADER_SIZE}\n width={width || 640}\n itemData={search.lines}\n itemSize={20}\n itemCount={search.lines.length}\n >\n {({ index, style, data }) => {\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.shouldShowButton(lineNumber) && (\n <IconButton\n data-testid=\"copy-button\"\n size=\"small\"\n className={classes.lineCopyButton}\n onClick={() => selection.copySelection()}\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 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 </FixedSizeList>\n </Box>\n )}\n </AutoSizer>\n );\n}\n"],"names":["ansiRegex","ansiRegexMaker","newlineRegex","codeModifiers","Object","fromEntries","entries","m","bold","italic","underline","_","foreground","background","map","code","modifier","AnsiLine","lastChunk","chunks","length","replaceLastChunk","newChunks","splice","text","c","join","toLocaleLowerCase","constructor","lineNumber","AnsiProcessor","process","lines","startsWith","lastLine","newLines","lastLineIndex","processLines","slice","modifiers","push","startingLineNumber","currentModifiers","currentLineNumber","prevIndex","lastIndex","match","exec","processText","line","index","fullText","processCode","getModifierClasses","classes","classNames","Array","modifierBold","modifierItalic","modifierUnderline","key","startCase","undefined","findSearchResults","searchText","includes","searchResults","offset","start","indexOf","end","calculateHighlightedChunks","results","lineOffset","resultIndex","result","chunk","localOffset","localStart","Math","max","localEnd","min","highlight","renderLink","attributes","content","href","props","Link","to","LogLine","highlightResultIndex","useMemo","elements","span","className","classnames","textSelectedHighlight","textHighlight","Linkify","options","render","LogViewerControls","resultCount","resultIndexStep","toggleShouldFilter","handleKeyPress","event","metaKey","ctrlKey","altKey","shiftKey","IconButton","size","onClick","ChevronLeftIcon","Typography","ChevronRightIcon","TextField","variant","placeholder","value","searchInput","onKeyPress","onChange","e","setSearchInput","target","shouldFilter","FilterListIcon","color","HEADER_SIZE","useStyles","makeStyles","theme","root","palette","paper","header","height","display","alignItems","justifyContent","log","fontFamily","fontSize","typography","pxToRem","position","whiteSpace","action","hover","lineSelected","selected","lineCopyButton","paddingTop","paddingBottom","textAlign","width","marginRight","spacing","cursor","alpha","info","main","fontWeight","fontWeightBold","fontStyle","textDecoration","modifierForegroundBlack","colors","black","modifierForegroundRed","modifierForegroundGreen","modifierForegroundYellow","modifierForegroundBlue","modifierForegroundMagenta","modifierForegroundCyan","modifierForegroundWhite","white","modifierForegroundGrey","modifierBackgroundBlack","modifierBackgroundRed","modifierBackgroundGreen","modifierBackgroundYellow","modifierBackgroundBlue","modifierBackgroundMagenta","modifierBackgroundCyan","modifierBackgroundWhite","modifierBackgroundGrey","name","applySearchFilter","matchingLines","lineResultIndex","lineIndex","useLogViewerSearch","filter","searchResult","useState","setResultIndex","useToggle","decrement","next","resultLine","resultLineIndex","useLogViewerSelection","errorApi","useApi","errorApiRef","sel","setSelection","error","copyToClipboard","useCopyToClipboard","useEffect","post","shouldShowButton","isSelected","add","s","copySelection","copyText","l","RealLogViewer","listRef","useRef","search","selection","location","useLocation","current","scrollToItem","hash","parseInt","replace","handleSelectLine","AutoSizer","Box","style","FixedSizeList","ref","itemData","itemSize","itemCount","data","data-testid","CopyIcon","a","role"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/6051.5b06b988.chunk.js","mappings":"4UAkBA,MAAMA,KAAYC,EAAAA,GAAe,EAC3BC,EAAe,SAGfC,EAAgBC,OAAOC,YAC3BD,OAAOE,QAAQ,CACb,EAAGC,IAAM,CAAE,GAAGA,EAAGC,KAAM,EAAK,GAC5B,EAAGD,IAAM,CAAE,GAAGA,EAAGE,OAAQ,EAAK,GAC9B,EAAGF,IAAM,CAAE,GAAGA,EAAGG,UAAW,EAAK,GACjC,GAAI,CAAC,CAAEF,KAAMG,EAAG,GAAGJ,CAAE,IAAMA,EAC3B,GAAI,CAAC,CAAEE,OAAQE,EAAG,GAAGJ,CAAE,IAAMA,EAC7B,GAAI,CAAC,CAAEG,UAAWC,EAAG,GAAGJ,CAAE,IAAMA,EAChC,GAAIA,IAAM,CAAE,GAAGA,EAAGK,WAAY,OAAQ,GACtC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,KAAM,GACpC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,OAAQ,GACtC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,QAAS,GACvC,GAAIL,IAAM,CAAE,GAAGA,EAAGK,WAAY,MAAO,GACrC,GAAIL,IAAM,CAAE,GA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GAASgI,EAAiB/M,EAAY+E,CAAK,EACpDgB,WAAYhB,GAASgI,EAAiB/M,EAAY+E,CAAK,E,SAEtD/E,C,MAEH,OAAC8D,GAAOA,CACN1C,KAAMA,EACNK,QAASA,EACTU,WAAYmK,EAAOnK,WACnB4B,qBACEuI,EAAOvB,aAAe/K,EAClBsM,EAAOtB,gBACP/I,M,KAKd,C,OAMZ,C","sources":["webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/AnsiProcessor.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/LogLine.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/LogViewerControls.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/styles.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/useLogViewerSearch.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/LogViewer/useLogViewerSelection.tsx","webpack://techdocs-cli-embedded-app/../core-components/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 ansiRegexMaker from 'ansi-regex';\n\nconst ansiRegex = ansiRegexMaker();\nconst newlineRegex = /\\n\\r?/g;\n\n// A mapping of how each escape code changes the modifiers\nconst codeModifiers = Object.fromEntries(\n Object.entries({\n 1: m => ({ ...m, bold: true }),\n 3: m => ({ ...m, italic: true }),\n 4: m => ({ ...m, underline: true }),\n 22: ({ bold: _, ...m }) => m,\n 23: ({ italic: _, ...m }) => m,\n 24: ({ underline: _, ...m }) => m,\n 30: m => ({ ...m, foreground: 'black' }),\n 31: m => ({ ...m, foreground: 'red' }),\n 32: m => ({ ...m, foreground: 'green' }),\n 33: m => ({ ...m, foreground: 'yellow' }),\n 34: m => ({ ...m, foreground: 'blue' }),\n 35: m => ({ ...m, foreground: 'magenta' }),\n 36: m => ({ ...m, foreground: 'cyan' }),\n 37: m => ({ ...m, foreground: 'white' }),\n 39: ({ foreground: _, ...m }) => m,\n 90: m => ({ ...m, foreground: 'grey' }),\n 40: m => ({ ...m, background: 'black' }),\n 41: m => ({ ...m, background: 'red' }),\n 42: m => ({ ...m, background: 'green' }),\n 43: m => ({ ...m, background: 'yellow' }),\n 44: m => ({ ...m, background: 'blue' }),\n 45: m => ({ ...m, background: 'magenta' }),\n 46: m => ({ ...m, background: 'cyan' }),\n 47: m => ({ ...m, background: 'white' }),\n 49: ({ background: _, ...m }) => m,\n } as Record<string, (m: ChunkModifiers) => ChunkModifiers>).map(\n ([code, modifier]) => [`\\x1b[${code}m`, modifier],\n ),\n);\n\nexport type AnsiColor =\n | 'black'\n | 'red'\n | 'green'\n | 'yellow'\n | 'blue'\n | 'magenta'\n | 'cyan'\n | 'white'\n | 'grey';\n\nexport interface ChunkModifiers {\n foreground?: AnsiColor;\n background?: AnsiColor;\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n}\n\nexport interface AnsiChunk {\n text: string;\n modifiers: ChunkModifiers;\n}\n\nexport class AnsiLine {\n text: string;\n\n constructor(\n readonly lineNumber: number = 1,\n readonly chunks: AnsiChunk[] = [],\n ) {\n this.text = chunks\n .map(c => c.text)\n .join('')\n .toLocaleLowerCase('en-US');\n }\n\n lastChunk(): AnsiChunk | undefined {\n return this.chunks[this.chunks.length - 1];\n }\n\n replaceLastChunk(newChunks?: AnsiChunk[]) {\n if (newChunks) {\n this.chunks.splice(this.chunks.length - 1, 1, ...newChunks);\n this.text = this.chunks\n .map(c => c.text)\n .join('')\n .toLocaleLowerCase('en-US');\n }\n }\n}\n\nexport class AnsiProcessor {\n private text: string = '';\n private lines: AnsiLine[] = [];\n\n /**\n * Processes a chunk of text while keeping internal state that optimizes\n * subsequent processing that appends to the text.\n */\n process(text: string): AnsiLine[] {\n if (this.text === text) {\n return this.lines;\n }\n\n if (text.startsWith(this.text)) {\n const lastLineIndex = this.lines.length > 0 ? this.lines.length - 1 : 0;\n const lastLine = this.lines[lastLineIndex] ?? new AnsiLine();\n const lastChunk = lastLine.lastChunk();\n\n const newLines = this.processLines(\n (lastChunk?.text ?? '') + text.slice(this.text.length),\n lastChunk?.modifiers,\n lastLine?.lineNumber,\n );\n lastLine.replaceLastChunk(newLines[0]?.chunks);\n\n this.lines[lastLineIndex] = lastLine;\n this.lines.push(...newLines.slice(1));\n } else {\n this.lines = this.processLines(text);\n }\n this.text = text;\n\n return this.lines;\n }\n\n // Split a chunk of text up into lines and process each line individually\n private processLines = (\n text: string,\n modifiers: ChunkModifiers = {},\n startingLineNumber: number = 1,\n ): AnsiLine[] => {\n const lines: AnsiLine[] = [];\n\n let currentModifiers = modifiers;\n let currentLineNumber = startingLineNumber;\n\n let prevIndex = 0;\n newlineRegex.lastIndex = 0;\n for (;;) {\n const match = newlineRegex.exec(text);\n if (!match) {\n const chunks = this.processText(\n text.slice(prevIndex),\n currentModifiers,\n );\n lines.push(new AnsiLine(currentLineNumber, chunks));\n return lines;\n }\n\n const line = text.slice(prevIndex, match.index);\n prevIndex = match.index + match[0].length;\n\n const chunks = this.processText(line, currentModifiers);\n lines.push(new AnsiLine(currentLineNumber, chunks));\n\n // Modifiers that are active in the last chunk are carried over to the next line\n currentModifiers =\n chunks[chunks.length - 1].modifiers ?? currentModifiers;\n currentLineNumber += 1;\n }\n };\n\n // Processing of a one individual text chunk\n private processText = (\n fullText: string,\n modifiers: ChunkModifiers,\n ): AnsiChunk[] => {\n const chunks: AnsiChunk[] = [];\n\n let currentModifiers = modifiers;\n\n let prevIndex = 0;\n ansiRegex.lastIndex = 0;\n for (;;) {\n const match = ansiRegex.exec(fullText);\n if (!match) {\n chunks.push({\n text: fullText.slice(prevIndex),\n modifiers: currentModifiers,\n });\n return chunks;\n }\n\n const text = fullText.slice(prevIndex, match.index);\n chunks.push({ text, modifiers: currentModifiers });\n\n // For every escape code that we encounter we keep track of where the\n // next chunk of text starts, and what modifiers it has\n prevIndex = match.index + match[0].length;\n currentModifiers = this.processCode(match[0], currentModifiers);\n }\n };\n\n private processCode = (\n code: string,\n modifiers: ChunkModifiers,\n ): ChunkModifiers => {\n return codeModifiers[code]?.(modifiers) ?? modifiers;\n };\n}\n","/*\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 React, { useMemo } from 'react';\nimport { AnsiChunk, AnsiLine, ChunkModifiers } from './AnsiProcessor';\nimport startCase from 'lodash/startCase';\nimport classnames from 'classnames';\nimport { useStyles } from './styles';\nimport Linkify from 'linkify-react';\nimport { Link } from '../Link';\n\nexport function getModifierClasses(\n classes: ReturnType<typeof useStyles>,\n modifiers: ChunkModifiers,\n) {\n const classNames = new Array<string>();\n if (modifiers.bold) {\n classNames.push(classes.modifierBold);\n }\n if (modifiers.italic) {\n classNames.push(classes.modifierItalic);\n }\n if (modifiers.underline) {\n classNames.push(classes.modifierUnderline);\n }\n if (modifiers.foreground) {\n const key = `modifierForeground${startCase(\n modifiers.foreground,\n )}` as keyof typeof classes;\n classNames.push(classes[key]);\n }\n if (modifiers.background) {\n const key = `modifierBackground${startCase(\n modifiers.background,\n )}` as keyof typeof classes;\n classNames.push(classes[key]);\n }\n return classNames.length > 0 ? classNames.join(' ') : undefined;\n}\n\nexport function findSearchResults(text: string, searchText: string) {\n if (!searchText || !text.includes(searchText)) {\n return undefined;\n }\n const searchResults = new Array<{ start: number; end: number }>();\n let offset = 0;\n for (;;) {\n const start = text.indexOf(searchText, offset);\n if (start === -1) {\n break;\n }\n const end = start + searchText.length;\n searchResults.push({ start, end });\n offset = end;\n }\n return searchResults;\n}\n\nexport interface HighlightAnsiChunk extends AnsiChunk {\n highlight?: number;\n}\n\nexport function calculateHighlightedChunks(\n line: AnsiLine,\n searchText: string,\n): HighlightAnsiChunk[] {\n const results = findSearchResults(line.text, searchText);\n if (!results) {\n return line.chunks;\n }\n\n const chunks = new Array<HighlightAnsiChunk>();\n\n let lineOffset = 0;\n let resultIndex = 0;\n let result = results[resultIndex];\n for (const chunk of line.chunks) {\n const { text, modifiers } = chunk;\n if (!result || lineOffset + text.length < result.start) {\n chunks.push(chunk);\n lineOffset += text.length;\n continue;\n }\n\n let localOffset = 0;\n while (result) {\n const localStart = Math.max(result.start - lineOffset, 0);\n if (localStart > text.length) {\n break; // The next result is not in this chunk\n }\n\n const localEnd = Math.min(result.end - lineOffset, text.length);\n\n const hasTextBeforeResult = localStart > localOffset;\n if (hasTextBeforeResult) {\n chunks.push({ text: text.slice(localOffset, localStart), modifiers });\n }\n const hasResultText = localEnd > localStart;\n if (hasResultText) {\n chunks.push({\n modifiers,\n highlight: resultIndex,\n text: text.slice(localStart, localEnd),\n });\n }\n\n localOffset = localEnd;\n\n const foundCompleteResult = result.end - lineOffset === localEnd;\n if (foundCompleteResult) {\n resultIndex += 1;\n result = results[resultIndex];\n } else {\n break; // The rest of the result is in the following chunks\n }\n }\n\n const hasTextAfterResult = localOffset < text.length;\n if (hasTextAfterResult) {\n chunks.push({ text: text.slice(localOffset), modifiers });\n }\n\n lineOffset += text.length;\n }\n\n return chunks;\n}\n\nconst renderLink = ({\n attributes,\n content,\n}: {\n attributes: { [attr: string]: any };\n content: string;\n}) => {\n const { href, ...props } = attributes;\n return (\n <Link to={href} {...props}>\n {content}\n </Link>\n );\n};\n\nexport interface LogLineProps {\n line: AnsiLine;\n classes: ReturnType<typeof useStyles>;\n searchText: string;\n highlightResultIndex?: number;\n}\n\nexport function LogLine({\n line,\n classes,\n searchText,\n highlightResultIndex,\n}: LogLineProps) {\n const chunks = useMemo(\n () => calculateHighlightedChunks(line, searchText),\n [line, searchText],\n );\n\n const elements = useMemo(\n () =>\n chunks.map(({ text, modifiers, highlight }, index) => (\n // eslint-disable-next-line react/forbid-elements\n <span\n key={index}\n className={classnames(\n getModifierClasses(classes, modifiers),\n highlight !== undefined &&\n (highlight === highlightResultIndex\n ? classes.textSelectedHighlight\n : classes.textHighlight),\n )}\n >\n <Linkify options={{ render: renderLink }}>{text}</Linkify>\n </span>\n )),\n [chunks, highlightResultIndex, classes],\n );\n\n return <>{elements}</>;\n}\n","/*\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 React from 'react';\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 { LogViewerSearch } from './useLogViewerSearch';\n\nexport interface LogViewerControlsProps extends LogViewerSearch {}\n\nexport function LogViewerControls(props: LogViewerControlsProps) {\n const { resultCount, resultIndexStep, toggleShouldFilter } = props;\n const resultIndex = props.resultIndex ?? 0;\n\n const handleKeyPress = (event: React.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=\"Search\"\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 </>\n );\n}\n","/*\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 { alpha, makeStyles } from '@material-ui/core/styles';\nimport * as colors from '@material-ui/core/colors';\n\nexport const HEADER_SIZE = 40;\n\n/** @public Class keys for overriding LogViewer styles */\nexport type LogViewerClassKey =\n | 'root'\n | 'header'\n | 'log'\n | 'line'\n | 'lineSelected'\n | 'lineCopyButton'\n | 'lineNumber'\n | 'textHighlight'\n | 'textSelectedHighlight'\n | 'modifierBold'\n | 'modifierItalic'\n | 'modifierUnderline'\n | 'modifierForegroundBlack'\n | 'modifierForegroundRed'\n | 'modifierForegroundGreen'\n | 'modifierForegroundYellow'\n | 'modifierForegroundBlue'\n | 'modifierForegroundMagenta'\n | 'modifierForegroundCyan'\n | 'modifierForegroundWhite'\n | 'modifierForegroundGrey'\n | 'modifierBackgroundBlack'\n | 'modifierBackgroundRed'\n | 'modifierBackgroundGreen'\n | 'modifierBackgroundYellow'\n | 'modifierBackgroundBlue'\n | 'modifierBackgroundMagenta'\n | 'modifierBackgroundCyan'\n | 'modifierBackgroundWhite'\n | 'modifierBackgroundGrey';\n\nexport const useStyles = makeStyles(\n theme => ({\n root: {\n background: theme.palette.background.paper,\n },\n header: {\n height: HEADER_SIZE,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n log: {\n fontFamily: '\"Monaco\", monospace',\n fontSize: theme.typography.pxToRem(12),\n },\n line: {\n position: 'relative',\n whiteSpace: 'pre',\n\n '&:hover': {\n background: theme.palette.action.hover,\n },\n },\n lineSelected: {\n background: theme.palette.action.selected,\n\n '&:hover': {\n background: theme.palette.action.selected,\n },\n },\n lineCopyButton: {\n position: 'absolute',\n paddingTop: 0,\n paddingBottom: 0,\n },\n lineNumber: {\n display: 'inline-block',\n textAlign: 'end',\n width: 60,\n marginRight: theme.spacing(1),\n cursor: 'pointer',\n },\n textHighlight: {\n background: alpha(theme.palette.info.main, 0.15),\n },\n textSelectedHighlight: {\n background: alpha(theme.palette.info.main, 0.4),\n },\n modifierBold: {\n fontWeight: theme.typography.fontWeightBold,\n },\n modifierItalic: {\n fontStyle: 'italic',\n },\n modifierUnderline: {\n textDecoration: 'underline',\n },\n modifierForegroundBlack: {\n color: colors.common.black,\n },\n modifierForegroundRed: {\n color: colors.red[500],\n },\n modifierForegroundGreen: {\n color: colors.green[500],\n },\n modifierForegroundYellow: {\n color: colors.yellow[500],\n },\n modifierForegroundBlue: {\n color: colors.blue[500],\n },\n modifierForegroundMagenta: {\n color: colors.purple[500],\n },\n modifierForegroundCyan: {\n color: colors.cyan[500],\n },\n modifierForegroundWhite: {\n color: colors.common.white,\n },\n modifierForegroundGrey: {\n color: colors.grey[500],\n },\n modifierBackgroundBlack: {\n background: colors.common.black,\n },\n modifierBackgroundRed: {\n background: colors.red[500],\n },\n modifierBackgroundGreen: {\n background: colors.green[500],\n },\n modifierBackgroundYellow: {\n background: colors.yellow[500],\n },\n modifierBackgroundBlue: {\n background: colors.blue[500],\n },\n modifierBackgroundMagenta: {\n background: colors.purple[500],\n },\n modifierBackgroundCyan: {\n background: colors.cyan[500],\n },\n modifierBackgroundWhite: {\n background: colors.common.white,\n },\n modifierBackgroundGrey: {\n background: colors.grey[500],\n },\n }),\n { name: 'BackstageLogViewer' },\n);\n","/*\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 { useMemo, useState } from 'react';\nimport { useToggle } from '@react-hookz/web';\nimport { AnsiLine } from './AnsiProcessor';\n\nexport function applySearchFilter(lines: AnsiLine[], searchText: string) {\n if (!searchText) {\n return { lines };\n }\n\n const matchingLines = [];\n const searchResults = [];\n for (const line of lines) {\n if (line.text.includes(searchText)) {\n matchingLines.push(line);\n\n let offset = 0;\n let lineResultIndex = 0;\n for (;;) {\n const start = line.text.indexOf(searchText, offset);\n if (start === -1) {\n break;\n }\n searchResults.push({\n lineNumber: line.lineNumber,\n lineIndex: lineResultIndex++,\n });\n offset = start + searchText.length;\n }\n }\n }\n\n return {\n lines: matchingLines,\n results: searchResults,\n };\n}\n\nexport interface LogViewerSearch {\n lines: AnsiLine[];\n\n searchText: string;\n searchInput: string;\n setSearchInput: (searchInput: string) => void;\n\n shouldFilter: boolean;\n toggleShouldFilter: () => void;\n\n resultCount: number | undefined;\n resultIndex: number | undefined;\n resultIndexStep: (decrement?: boolean) => void;\n\n resultLine: number | undefined;\n resultLineIndex: number | undefined;\n}\n\nexport function useLogViewerSearch(lines: AnsiLine[]): LogViewerSearch {\n const [searchInput, setSearchInput] = useState('');\n const searchText = searchInput.toLocaleLowerCase('en-US');\n\n const [resultIndex, setResultIndex] = useState<number>(0);\n\n const [shouldFilter, toggleShouldFilter] = useToggle(false);\n\n const filter = useMemo(\n () => applySearchFilter(lines, searchText),\n [lines, searchText],\n );\n\n const searchResult = filter.results\n ? filter.results[Math.min(resultIndex, filter.results.length - 1)]\n : undefined;\n const resultCount = filter.results?.length;\n\n const resultIndexStep = (decrement?: boolean) => {\n if (decrement) {\n if (resultCount !== undefined) {\n const next = Math.min(resultIndex - 1, resultCount - 2);\n setResultIndex(next < 0 ? resultCount - 1 : next);\n }\n } else {\n if (resultCount !== undefined) {\n const next = resultIndex + 1;\n setResultIndex(next >= resultCount ? 0 : next);\n }\n }\n };\n\n return {\n lines: shouldFilter ? filter.lines : lines,\n searchText,\n searchInput,\n setSearchInput,\n shouldFilter,\n toggleShouldFilter,\n resultCount,\n resultIndex,\n resultIndexStep,\n resultLine: searchResult?.lineNumber,\n resultLineIndex: searchResult?.lineIndex,\n };\n}\n","/*\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 { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useEffect, useState } from 'react';\nimport useCopyToClipboard from 'react-use/lib/useCopyToClipboard';\nimport { AnsiLine } from './AnsiProcessor';\n\nexport function useLogViewerSelection(lines: AnsiLine[]) {\n const errorApi = useApi(errorApiRef);\n const [sel, setSelection] = useState<{ start: number; end: number }>();\n const start = sel ? Math.min(sel.start, sel.end) : undefined;\n const end = sel ? Math.max(sel.start, sel.end) : undefined;\n\n const [{ error }, copyToClipboard] = useCopyToClipboard();\n\n useEffect(() => {\n if (error) {\n errorApi.post(error);\n }\n }, [error, errorApi]);\n\n return {\n shouldShowButton(line: number) {\n return start === line || end === line;\n },\n isSelected(line: number) {\n if (!sel) {\n return false;\n }\n return start! <= line && line <= end!;\n },\n setSelection(line: number, add: boolean) {\n if (add) {\n setSelection(s =>\n s ? { start: s.start, end: line } : { start: line, end: line },\n );\n } else {\n setSelection(s =>\n s?.start === line && s?.end === line\n ? undefined\n : { start: line, end: line },\n );\n }\n },\n copySelection() {\n if (sel) {\n const copyText = lines\n .slice(Math.min(sel.start, sel.end) - 1, Math.max(sel.start, sel.end))\n .map(l => l.chunks.map(c => c.text).join(''))\n .join('\\n');\n copyToClipboard(copyText);\n setSelection(undefined);\n }\n },\n };\n}\n","/*\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 React, { useEffect, useMemo, useRef } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { FixedSizeList } from 'react-window';\n\nimport { 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';\n\nexport interface RealLogViewerProps {\n text: string;\n classes?: { root?: string };\n}\n\nexport function RealLogViewer(props: RealLogViewerProps) {\n const classes = useStyles({ classes: props.classes });\n const listRef = useRef<FixedSizeList | null>(null);\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\n const search = useLogViewerSearch(lines);\n const selection = useLogViewerSelection(lines);\n const location = useLocation();\n\n useEffect(() => {\n if (search.resultLine !== undefined && listRef.current) {\n listRef.current.scrollToItem(search.resultLine - 1, 'center');\n }\n }, [search.resultLine]);\n\n useEffect(() => {\n if (location.hash) {\n // #line-6 -> 6\n const line = parseInt(location.hash.replace(/\\D/g, ''), 10);\n selection.setSelection(line, false);\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleSelectLine = (\n line: number,\n event: { shiftKey: boolean; preventDefault: () => void },\n ) => {\n selection.setSelection(line, event.shiftKey);\n };\n\n return (\n <AutoSizer>\n {({ height, width }: { height?: number; width?: number }) => (\n <Box style={{ width, height }} className={classes.root}>\n <Box className={classes.header}>\n <LogViewerControls {...search} />\n </Box>\n <FixedSizeList\n ref={listRef}\n className={classes.log}\n height={(height || 480) - HEADER_SIZE}\n width={width || 640}\n itemData={search.lines}\n itemSize={20}\n itemCount={search.lines.length}\n >\n {({ index, style, data }) => {\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.shouldShowButton(lineNumber) && (\n <IconButton\n data-testid=\"copy-button\"\n size=\"small\"\n className={classes.lineCopyButton}\n onClick={() => selection.copySelection()}\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 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 </FixedSizeList>\n </Box>\n )}\n </AutoSizer>\n );\n}\n"],"names":["ansiRegex","ansiRegexMaker","newlineRegex","codeModifiers","Object","fromEntries","entries","m","bold","italic","underline","_","foreground","background","map","code","modifier","AnsiLine","lastChunk","chunks","length","replaceLastChunk","newChunks","splice","text","c","join","toLocaleLowerCase","constructor","lineNumber","AnsiProcessor","process","lines","startsWith","lastLine","newLines","lastLineIndex","processLines","slice","modifiers","push","startingLineNumber","currentModifiers","currentLineNumber","prevIndex","lastIndex","match","exec","processText","line","index","fullText","processCode","getModifierClasses","classes","classNames","Array","modifierBold","modifierItalic","modifierUnderline","key","startCase","undefined","findSearchResults","searchText","includes","searchResults","offset","start","indexOf","end","calculateHighlightedChunks","results","lineOffset","resultIndex","result","chunk","localOffset","localStart","Math","max","localEnd","min","highlight","renderLink","attributes","content","href","props","Link","to","LogLine","highlightResultIndex","useMemo","elements","span","className","classnames","textSelectedHighlight","textHighlight","Linkify","options","render","LogViewerControls","resultCount","resultIndexStep","toggleShouldFilter","handleKeyPress","event","metaKey","ctrlKey","altKey","shiftKey","IconButton","size","onClick","ChevronLeftIcon","Typography","ChevronRightIcon","TextField","variant","placeholder","value","searchInput","onKeyPress","onChange","e","setSearchInput","target","shouldFilter","FilterListIcon","color","HEADER_SIZE","useStyles","makeStyles","theme","root","palette","paper","header","height","display","alignItems","justifyContent","log","fontFamily","fontSize","typography","pxToRem","position","whiteSpace","action","hover","lineSelected","selected","lineCopyButton","paddingTop","paddingBottom","textAlign","width","marginRight","spacing","cursor","alpha","info","main","fontWeight","fontWeightBold","fontStyle","textDecoration","modifierForegroundBlack","colors","black","modifierForegroundRed","modifierForegroundGreen","modifierForegroundYellow","modifierForegroundBlue","modifierForegroundMagenta","modifierForegroundCyan","modifierForegroundWhite","white","modifierForegroundGrey","modifierBackgroundBlack","modifierBackgroundRed","modifierBackgroundGreen","modifierBackgroundYellow","modifierBackgroundBlue","modifierBackgroundMagenta","modifierBackgroundCyan","modifierBackgroundWhite","modifierBackgroundGrey","name","applySearchFilter","matchingLines","lineResultIndex","lineIndex","useLogViewerSearch","filter","searchResult","useState","setResultIndex","useToggle","decrement","next","resultLine","resultLineIndex","useLogViewerSelection","errorApi","useApi","errorApiRef","sel","setSelection","error","copyToClipboard","useCopyToClipboard","useEffect","post","shouldShowButton","isSelected","add","s","copySelection","copyText","l","RealLogViewer","listRef","useRef","search","selection","location","useLocation","current","scrollToItem","hash","parseInt","replace","handleSelectLine","AutoSizer","Box","style","FixedSizeList","ref","itemData","itemSize","itemCount","data","data-testid","CopyIcon","a","role"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7670],{27670:function(T,o,t){t.r(o),t.d(o,{CatalogSearchResultListItem:function(){return u}});var e=t(52322),y=t(2784),r=t(79692),m=t(86136),x=t(49378),g=t(62774),d=t(7089),f=t(98864),h=t(76079);const v=(0,r.Z)({item:{display:"flex"},flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}},{name:"CatalogSearchResultListItem"});function u(s){var a,n;const l=s.result,i=s.highlight,c=v();return l?(0,e.jsxs)("div",{className:c.item,children:[s.icon&&(0,e.jsx)(m.Z,{children:typeof s.icon=="function"?s.icon(l):s.icon}),(0,e.jsxs)("div",{className:c.flexContainer,children:[(0,e.jsx)(x.Z,{className:c.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,e.jsx)(f.rU,{noTrack:!0,to:l.location,children:!((a=i)===null||a===void 0)&&a.fields.title?(0,e.jsx)(h.F,{text:i.fields.title,preTag:i.preTag,postTag:i.postTag}):l.title}),secondary:!((n=i)===null||n===void 0)&&n.fields.text?(0,e.jsx)(h.F,{text:i.fields.text,preTag:i.preTag,postTag:i.postTag}):l.text}),(0,e.jsxs)(g.Z,{children:[l.kind&&(0,e.jsx)(d.Z,{label:`Kind: ${l.kind}`,size:"small"}),l.lifecycle&&(0,e.jsx)(d.Z,{label:`Lifecycle: ${l.lifecycle}`,size:"small"})]})]})]}):null}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=7670.dce585cd.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/7670.
|
|
1
|
+
{"version":3,"file":"static/7670.dce585cd.chunk.js","mappings":"yTA+BA,MAAMA,KAAYC,EAAAA,GAChB,CACEC,KAAM,CACJC,QAAS,MACX,EACAC,cAAe,CACbC,SAAU,MACZ,EACAC,SAAU,CACRC,MAAO,OACPC,UAAW,YACXC,aAAc,MAChB,CACF,EACA,CAAEC,KAAM,6BAA8B,CAAC,EAgBlC,SAASC,EACdC,EAAuC,C,IAsB1BC,EAYHA,EAhCV,MAAMC,EAASF,EAAME,OACfD,EAAYD,EAAMC,UAElBE,EAAUf,EAAU,EAE1B,OAAKc,KAGH,QAACE,MAAAA,CAAIC,UAAWF,EAAQb,K,UACrBU,EAAMM,SACL,OAACC,EAAAA,EAAYA,C,SACV,OAAOP,EAAMM,MAAS,WAAaN,EAAMM,KAAKJ,CAAM,EAAIF,EAAMM,I,MAGnE,QAACF,MAAAA,CAAIC,UAAWF,EAAQX,c,aACtB,OAACgB,EAAAA,EAAYA,CACXH,UAAWF,EAAQT,SACnBe,uBAAwB,CAAEC,QAAS,IAAK,EACxCC,WACE,OAACC,EAAAA,GAAIA,CAACC,QAAO,GAACC,GAAIZ,EAAOa,S,SACtBd,GAAAA,EAAAA,KAAAA,MAAAA,IAAAA,SAAAA,EAAWe,OAAOC,SACjB,OAACC,EAAAA,EAA2BA,CAC1BC,KAAMlB,EAAUe,OAAOC,MACvBG,OAAQnB,EAAUmB,OAClBC,QAASpB,EAAUoB,O,GAGrBnB,EAAOe,K,GAIbK,UACErB,GAAAA,EAAAA,KAAAA,MAAAA,IAAAA,SAAAA,EAAWe,OAAOG,QAChB,OAACD,EAAAA,EAA2BA,CAC1BC,KAAMlB,EAAUe,OAAOG,KACvBC,OAAQnB,EAAUmB,OAClBC,QAASpB,EAAUoB,O,GAGrBnB,EAAOiB,I,MAIb,QAACI,EAAAA,EAAGA,C,UACDrB,EAAOsB,SAAQ,OAACC,EAAAA,EAAIA,CAACC,MAAO,SAASxB,EAAOsB,OAAQG,KAAK,O,GACzDzB,EAAO0B,cACN,OAACH,EAAAA,EAAIA,CAACC,MAAO,cAAcxB,EAAO0B,YAAaD,KAAK,O,YAzC1C,IA+CtB,C","sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/CatalogSearchResultListItem/CatalogSearchResultListItem.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 React, { ReactNode } from 'react';\nimport {\n Box,\n Chip,\n ListItemIcon,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { Link } from '@backstage/core-components';\nimport {\n IndexableDocument,\n ResultHighlight,\n} from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\n\nconst useStyles = makeStyles(\n {\n item: {\n display: 'flex',\n },\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n wordBreak: 'break-all',\n marginBottom: '1rem',\n },\n },\n { name: 'CatalogSearchResultListItem' },\n);\n\n/**\n * Props for {@link CatalogSearchResultListItem}.\n *\n * @public\n */\nexport interface CatalogSearchResultListItemProps {\n icon?: ReactNode | ((result: IndexableDocument) => ReactNode);\n result?: IndexableDocument;\n highlight?: ResultHighlight;\n rank?: number;\n}\n\n/** @public */\nexport function CatalogSearchResultListItem(\n props: CatalogSearchResultListItemProps,\n) {\n const result = props.result as any;\n const highlight = props.highlight as ResultHighlight;\n\n const classes = useStyles();\n\n if (!result) return null;\n\n return (\n <div className={classes.item}>\n {props.icon && (\n <ListItemIcon>\n {typeof props.icon === 'function' ? props.icon(result) : props.icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <Link noTrack to={result.location}>\n {highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={highlight.fields.title}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.title\n )}\n </Link>\n }\n secondary={\n highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={highlight.fields.text}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.text\n )\n }\n />\n <Box>\n {result.kind && <Chip label={`Kind: ${result.kind}`} size=\"small\" />}\n {result.lifecycle && (\n <Chip label={`Lifecycle: ${result.lifecycle}`} size=\"small\" />\n )}\n </Box>\n </div>\n </div>\n );\n}\n"],"names":["useStyles","makeStyles","item","display","flexContainer","flexWrap","itemText","width","wordBreak","marginBottom","name","CatalogSearchResultListItem","props","highlight","result","classes","div","className","icon","ListItemIcon","ListItemText","primaryTypographyProps","variant","primary","Link","noTrack","to","location","fields","title","HighlightedSearchResultText","text","preTag","postTag","secondary","Box","kind","Chip","label","size","lifecycle"],"sourceRoot":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7750],{27597:function(M,c,t){var n,m=t(71600),h=t(34590);n={value:!0},c.Z=void 0;var p=h(t(2784)),y=m(t(50175)),u=(0,y.default)(p.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");c.Z=u},52160:function(M,c,t){var n,m=t(71600),h=t(34590);n={value:!0},c.Z=void 0;var p=h(t(2784)),y=m(t(50175)),u=(0,y.default)(p.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");c.Z=u},1546:function(M,c,t){t.d(c,{r:function(){return D}});var n=t(52322),m=t(94339),h=t(14503),p=t(24579),y=t(32552),u=t(85256),L=t(79692),S=t(15459),P=t(72779),I=t.n(P),T=t(2784),e=t(62774),i=t(90436),x=t(27597),C=t(98864);const o=(0,L.Z)(s=>({root:{maxWidth:"fit-content",padding:s.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:s.palette.textSubtle},arrow:{color:s.palette.textSubtle}}),{name:"BackstageBottomLink"});function l(s){const{link:a,title:g,onClick:A}=s,B=o();return(0,n.jsxs)(e.Z,{children:[(0,n.jsx)(u.Z,{}),(0,n.jsx)(C.rU,{to:a,onClick:A,underline:"none",children:(0,n.jsxs)(e.Z,{display:"flex",alignItems:"center",className:B.root,children:[(0,n.jsx)(e.Z,{className:B.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,n.jsx)(i.Z,{children:(0,n.jsx)("strong",{children:g})})}),(0,n.jsx)(x.Z,{className:B.arrow})]})})]})}var d=t(15929),f=t(74359);const v=s=>{const{slackChannel:a}=s;if(a){if(typeof a=="string")return(0,n.jsxs)(i.Z,{children:["Please contact ",a," for help."]});if(!a.href)return(0,n.jsxs)(i.Z,{children:["Please contact ",a.name," for help."]})}else return null;return(0,n.jsx)(d.Q,{to:a.href,variant:"contained",children:a.name})},E=class extends T.Component{componentDidCatch(a,g){console.error(`ErrorBoundary, error: ${a}, info: ${g}`),this.setState({error:a,errorInfo:g})}render(){const{slackChannel:a,children:g}=this.props,{error:A}=this.state;return A?(0,n.jsx)(f.y,{title:"Something Went Wrong",error:A,children:(0,n.jsx)(v,{slackChannel:a})}):g}constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}},r=(0,L.Z)(s=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:s.spacing(2,2,2,2.5)},headerTitle:{fontWeight:s.typography.fontWeightBold},headerSubheader:{paddingTop:s.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),j=(0,S.Z)(s=>({root:{display:"inline-block",padding:s.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(h.Z),R={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function D(s){const{title:a,subheader:g,divider:A=!0,deepLink:B,slackChannel:W,errorBoundaryProps:K,variant:k,children:V,headerStyle:Y,headerProps:F,icon:z,action:G,actionsClassName:$,actions:b,cardClassName:Q,actionsTopRight:H,className:X,noPadding:J,titleTypographyProps:w}=s,Z=r();let N={},O={};k&&k.split(/[\s]+/g).forEach(U=>{N={...N,...R.card[U]},O={...O,...R.cardContent[U]}});const q=()=>!g&&!z?null:(0,n.jsxs)("div",{className:Z.headerSubheader,"data-testid":"info-card-subheader",children:[g&&(0,n.jsx)("div",{className:Z.subheader,children:g}),z]}),_=K||(W?{slackChannel:W}:{});return(0,n.jsx)(m.Z,{style:N,className:X,children:(0,n.jsxs)(E,{..._,children:[a&&(0,n.jsx)(y.Z,{classes:{root:Z.header,title:Z.headerTitle,subheader:Z.headerSubheader,avatar:Z.headerAvatar,action:Z.headerAction,content:Z.headerContent},title:a,subheader:q(),action:G,style:{...Y},titleTypographyProps:w,...F}),H&&(0,n.jsx)(j,{children:H}),A&&(0,n.jsx)(u.Z,{}),(0,n.jsx)(p.Z,{className:I()(Q,{[Z.noPadding]:J}),style:O,children:V}),b&&(0,n.jsx)(h.Z,{className:$,children:b}),B&&(0,n.jsx)(l,{...B})]})})}},96641:function(M,c,t){t.d(c,{X2:function(){return I},h$:function(){return S}});var n=t(52322),m=t(74314),h=t(72388),p=t(29651),y=t(68993),u=t(2784);const L=(0,p.CT)("entity-context"),S=e=>{const{children:i,entity:x,loading:C,error:o,refresh:l}=e,d={entity:x,loading:C,error:o,refresh:l};return(0,n.jsx)(L.Provider,{value:(0,y.E)({1:d}),children:(0,n.jsx)(h.fC,{attributes:{...x?{entityRef:(0,m.eE)(x)}:void 0},children:i})})},P=e=>_jsx(S,{entity:e.entity,loading:!Boolean(e.entity),error:void 0,refresh:void 0,children:e.children});function I(){const e=(0,p.Vt)("entity-context");if(!e)throw new Error("Entity context is not available");const i=e.atVersion(1);if(!i)throw new Error("EntityContext v1 not available");if(!i.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:i.entity}}function T(){const e=useVersionedContext("entity-context");if(!e)throw new Error("Entity context is not available");const i=e.atVersion(1);if(!i)throw new Error("EntityContext v1 not available");const{entity:x,loading:C,error:o,refresh:l}=i;return{entity:x,loading:C,error:o,refresh:l}}},24851:function(M,c,t){t.d(c,{s:function(){return C}});var n=t(52322),m=t(90348),h=t(11861),p=t(2784),y=t(79692),u=t(62774),L=t(90436),S=t(52160),P=t(98864);const I=(0,y.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function T(o){const{href:l,text:d,Icon:f}=o,v=I();return(0,n.jsxs)(u.Z,{display:"flex",children:[(0,n.jsx)(u.Z,{mr:1,className:v.svgIcon,children:(0,n.jsx)(L.Z,{component:"div",children:f?(0,n.jsx)(f,{}):(0,n.jsx)(S.Z,{})})}),(0,n.jsx)(u.Z,{flexGrow:"1",children:(0,n.jsx)(P.rU,{to:l,target:"_blank",rel:"noopener",children:d||l})})]})}var e=t(41156);const i={xs:1,sm:1,md:1,lg:2,xl:3};function x(o){const l=[(0,e.Z)(r=>r.breakpoints.up("xl"))?"xl":null,(0,e.Z)(r=>r.breakpoints.up("lg"))?"lg":null,(0,e.Z)(r=>r.breakpoints.up("md"))?"md":null,(0,e.Z)(r=>r.breakpoints.up("sm"))?"sm":null,(0,e.Z)(r=>r.breakpoints.up("xs"))?"xs":null];let d=1;if(typeof o=="number")d=o;else{var f,v;const r=(v=l.find(j=>j!==null))!==null&&v!==void 0?v:"xs";var E;d=(E=(f=o)===null||f===void 0?void 0:f[r])!==null&&E!==void 0?E:i[r]}return d}function C(o){const{items:l,cols:d=void 0}=o,f=x(d);return(0,n.jsx)(m.Z,{rowHeight:"auto",cols:f,children:l.map(({text:v,href:E,Icon:r},j)=>(0,n.jsx)(h.Z,{children:(0,n.jsx)(T,{href:E,text:v!=null?v:E,Icon:r})},j))})}},17750:function(M,c,t){t.r(c),t.d(c,{EntityLinksCard:function(){return C}});var n=t(52322),m=t(96641),h=t(52160),p=t(2784),y=t(79692),u=t(90436),L=t(77277),S=t(9791);const P=`metadata:
|
|
2
|
+
name: example
|
|
3
|
+
links:
|
|
4
|
+
- url: https://dashboard.example.com
|
|
5
|
+
title: My Dashboard
|
|
6
|
+
icon: dashboard`,I=(0,y.Z)(o=>({code:{borderRadius:6,margin:o.spacing(2,0),background:o.palette.type==="dark"?"#444":o.palette.common.white}}),{name:"PluginCatalogEntityLinksEmptyState"});function T(){const o=I();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.Z,{variant:"body1",children:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:"}),(0,n.jsx)("div",{className:o.code,children:(0,n.jsx)(S.O,{text:P,language:"yaml",showLineNumbers:!0,highlightedNumbers:[3,4,5,6],customStyle:{background:"inherit",fontSize:"115%"}})}),(0,n.jsx)(L.Z,{variant:"contained",color:"primary",target:"_blank",href:"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional",children:"Read more"})]})}var e=t(24851),i=t(80851),x=t(1546);const C=o=>{var l,d;const{cols:f=void 0,variant:v}=o,{entity:E}=(0,m.X2)(),r=(0,i.q)();var j;const R=s=>s&&(j=r.getSystemIcon(s))!==null&&j!==void 0?j:h.Z,D=(d=E)===null||d===void 0||(l=d.metadata)===null||l===void 0?void 0:l.links;return(0,n.jsx)(x.r,{title:"Links",variant:v,children:!D||D.length===0?(0,n.jsx)(T,{}):(0,n.jsx)(e.s,{cols:f,items:D.map(({url:s,title:a,icon:g})=>({text:a!=null?a:s,href:s,Icon:R(g)}))})})}}}]);})();
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=7750.f3e35b68.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/7750.f3e35b68.chunk.js","mappings":"yJAEIA,EAAyB,EAAQ,KAA8C,EAE/EC,EAA0B,EAAQ,K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B,EACNS,SAAS,OACTC,gBAAe,GACfC,mBAAoB,CAAC,EAAG,EAAG,EAAG,C,EAC9BC,YAAa,CAAET,WAAY,UAAWrC,SAAU,MAAO,C,QAG3D,OAAC+C,EAAAA,EAAMA,CACLzI,QAAQ,YACR5B,MAAM,UACN+H,OAAO,SACPrG,KAAK,uF,SACN,W,KAKP,C,oCCxCO,MAAM4I,EAAmBhK,GAAAA,C,IAQhB6F,EAAAA,EAPd,KAAM,CAAEqC,KAAAA,EAAO/F,OAAWb,QAAAA,CAAQ,EAAItB,EAChC,CAAE6F,OAAAA,CAAO,KAAIY,EAAAA,IAAU,EACvBwD,KAAMC,EAAAA,GAAO,E,IAGXD,EADR,MAAME,EAAgBC,GACpBA,IAAMH,EAAAA,EAAII,cAAcD,CAAG,KAAHA,MAAlBH,IAAAA,OAAAA,EAAyC1C,EAAAA,EAE3C+C,GAAQzE,EAAAA,KAAAA,MAAAA,IAAAA,SAAAA,EAAAA,EAAQ0E,YAAQ,MAAhB1E,IAAAA,OAAAA,OAAAA,EAAkByE,MAEhC,SACE,OAACxG,EAAAA,EAAQA,CAAC5D,MAAM,QAAQoB,QAASA,E,SAC9B,CAACgJ,GAASA,EAAME,SAAW,KAC1B,OAACf,EAAqBA,CAAAA,CAAAA,KAEtB,OAACd,EAAAA,EAAaA,CACZT,KAAMA,EACNU,MAAO0B,EAAMvB,IAAI,CAAC,CAAE0B,IAAAA,EAAKvK,MAAAA,EAAOkE,KAAAA,CAAK,KAAO,CAC1C+C,KAAMjH,GAAAA,KAAAA,EAASuK,EACfrJ,KAAMqJ,EACNrD,KAAM+C,EAAa/F,CAAI,CACzB,EAAE,C,IAKZ,C","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/Language.js","webpack://techdocs-cli-embedded-app/../core-components/src/layout/BottomLink/BottomLink.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/InfoCard/InfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstageTheme } from '@backstage/theme';\nimport Box from '@material-ui/core/Box';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport React from 'react';\nimport { Link } from '../../components/Link';\n\n/** @public */\nexport type BottomLinkClassKey = 'root' | 'boxTitle' | 'arrow';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n root: {\n maxWidth: 'fit-content',\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle,\n },\n arrow: {\n color: theme.palette.textSubtle,\n },\n }),\n { name: 'BackstageBottomLink' },\n);\n\n/** @public */\nexport type BottomLinkProps = {\n link: string;\n title: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;\n};\n\n/**\n * Footer with link used in {@link InfoCard } and {@link TabbedCard}\n *\n * @public\n *\n */\nexport function BottomLink(props: BottomLinkProps) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n\n return (\n <Box>\n <Divider />\n <Link to={link} onClick={onClick} underline=\"none\">\n <Box display=\"flex\" alignItems=\"center\" className={classes.root}>\n <Box className={classes.boxTitle} fontWeight=\"fontWeightBold\" m={1}>\n <Typography>\n <strong>{title}</strong>\n </Typography>\n </Box>\n <ArrowIcon className={classes.arrow} />\n </Box>\n </Link>\n </Box>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Typography from '@material-ui/core/Typography';\nimport React, { ComponentClass, Component, ErrorInfo } from 'react';\nimport { LinkButton } from '../../components/LinkButton';\nimport { ErrorPanel } from '../../components/ErrorPanel';\n\ntype SlackChannel = {\n name: string;\n href?: string;\n};\n\n/** @public */\nexport type ErrorBoundaryProps = React.PropsWithChildren<{\n slackChannel?: string | SlackChannel;\n onError?: (error: Error, errorInfo: string) => null;\n}>;\n\ntype State = {\n error?: Error;\n errorInfo?: ErrorInfo;\n};\n\nconst SlackLink = (props: { slackChannel?: string | SlackChannel }) => {\n const { slackChannel } = props;\n\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === 'string') {\n return <Typography>Please contact {slackChannel} for help.</Typography>;\n } else if (!slackChannel.href) {\n return (\n <Typography>Please contact {slackChannel.name} for help.</Typography>\n );\n }\n\n return (\n <LinkButton to={slackChannel.href} variant=\"contained\">\n {slackChannel.name}\n </LinkButton>\n );\n};\n\n/** @public */\nexport const ErrorBoundary: ComponentClass<\n ErrorBoundaryProps,\n State\n> = class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n error: undefined,\n errorInfo: undefined,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // eslint-disable-next-line no-console\n console.error(`ErrorBoundary, error: ${error}, info: ${errorInfo}`);\n this.setState({ error, errorInfo });\n }\n\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n\n if (!error) {\n return children;\n }\n\n return (\n <ErrorPanel title=\"Something Went Wrong\" error={error}>\n <SlackLink slackChannel={slackChannel} />\n </ErrorPanel>\n );\n }\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader, { CardHeaderProps } from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { ReactNode } from 'react';\nimport { BottomLink, BottomLinkProps } from '../BottomLink';\nimport { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary';\n\n/** @public */\nexport type InfoCardClassKey =\n | 'noPadding'\n | 'header'\n | 'headerTitle'\n | 'headerSubheader'\n | 'headerAvatar'\n | 'headerAction'\n | 'headerContent';\n\nconst useStyles = makeStyles(\n theme => ({\n noPadding: {\n padding: 0,\n '&:last-child': {\n paddingBottom: 0,\n },\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold,\n },\n headerSubheader: {\n paddingTop: theme.spacing(1),\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: 'flex',\n },\n }),\n { name: 'BackstageInfoCard' },\n);\n\n/** @public */\nexport type CardActionsTopRightClassKey = 'root';\n\nconst CardActionsTopRight = withStyles(\n theme => ({\n root: {\n display: 'inline-block',\n padding: theme.spacing(8, 8, 0, 0),\n float: 'right',\n },\n }),\n { name: 'BackstageInfoCardCardActionsTopRight' },\n)(CardActions);\n\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: 'flex',\n flexDirection: 'column',\n },\n fullHeight: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItem: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n breakInside: 'avoid-page',\n '@media print': {\n height: 'auto',\n },\n },\n },\n cardContent: {\n fullHeight: {\n flex: 1,\n },\n gridItem: {\n flex: 1,\n },\n },\n};\n\n/** @public */\nexport type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';\n\n/**\n * InfoCard is used to display a paper-styled block on the screen, similar to a panel.\n *\n * You can custom style an InfoCard with the 'className' (outer container) and 'cardClassName' (inner container)\n * props. This is typically used with the material-ui makeStyles mechanism.\n *\n * The InfoCard serves as an error boundary. As a result, if you provide an 'errorBoundaryProps' property this\n * specifies the extra information to display in the error component that is displayed if an error occurs\n * in any descendent components.\n *\n * By default the InfoCard has no custom layout of its children, but is treated as a block element. A\n * couple common variants are provided and can be specified via the variant property:\n *\n * When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items.\n * Set to the 'gridItem' variant to display the InfoCard with full height suitable for Grid:\n *\n * `<InfoCard variant=\"gridItem\">...</InfoCard>`\n */\nexport type Props = {\n title?: ReactNode;\n subheader?: ReactNode;\n divider?: boolean;\n deepLink?: BottomLinkProps;\n /** @deprecated Use errorBoundaryProps instead */\n slackChannel?: string;\n errorBoundaryProps?: ErrorBoundaryProps;\n variant?: InfoCardVariants;\n children?: ReactNode;\n headerStyle?: object;\n headerProps?: CardHeaderProps;\n icon?: ReactNode;\n action?: ReactNode;\n actionsClassName?: string;\n actions?: ReactNode;\n cardClassName?: string;\n actionsTopRight?: ReactNode;\n className?: string;\n noPadding?: boolean;\n titleTypographyProps?: object;\n};\n\n/**\n * Material-ui card with header , content and actions footer\n *\n * @public\n *\n */\nexport function InfoCard(props: Props): JSX.Element {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n } = props;\n const classes = useStyles();\n /**\n * If variant is specified, we build up styles for that particular variant for both\n * the Card and the CardContent (since these need to be synced)\n */\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach(name => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name as keyof (typeof VARIANT_STYLES)['card']],\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[\n name as keyof (typeof VARIANT_STYLES)['cardContent']\n ],\n };\n });\n }\n\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n\n return (\n <div\n className={classes.headerSubheader}\n data-testid=\"info-card-subheader\"\n >\n {subheader && <div className={classes.subheader}>{subheader}</div>}\n {icon}\n </div>\n );\n };\n\n const errProps: ErrorBoundaryProps =\n errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n\n return (\n <Card style={calculatedStyle} className={className}>\n <ErrorBoundary {...errProps}>\n {title && (\n <CardHeader\n classes={{\n root: classes.header,\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent,\n }}\n title={title}\n subheader={cardSubTitle()}\n action={action}\n style={{ ...headerStyle }}\n titleTypographyProps={titleTypographyProps}\n {...headerProps}\n />\n )}\n {actionsTopRight && (\n <CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>\n )}\n {divider && <Divider />}\n <CardContent\n className={classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n })}\n style={calculatedCardStyle}\n >\n {children}\n </CardContent>\n {actions && (\n <CardActions className={actionsClassName}>{actions}</CardActions>\n )}\n {deepLink && <BottomLink {...deepLink} />}\n </ErrorBoundary>\n </Card>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport React, { ReactNode } from 'react';\n\n/** @public */\nexport type EntityLoadingStatus<TEntity extends Entity = Entity> = {\n entity?: TEntity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n};\n\n// This context has support for multiple concurrent versions of this package.\n// It is currently used in parallel with the old context in order to provide\n// a smooth transition, but will eventually be the only context we use.\nconst NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n);\n\n/**\n * Properties for the AsyncEntityProvider component.\n *\n * @public\n */\nexport interface AsyncEntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n}\n\n/**\n * Provides a loaded entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const AsyncEntityProvider = (props: AsyncEntityProviderProps) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n // We provide both the old and the new context, since\n // consumers might be doing things like `useContext(EntityContext)`\n return (\n <NewEntityContext.Provider value={createVersionedValueMap({ 1: value })}>\n <AnalyticsContext\n attributes={{\n ...(entity ? { entityRef: stringifyEntityRef(entity) } : undefined),\n }}\n >\n {children}\n </AnalyticsContext>\n </NewEntityContext.Provider>\n );\n};\n\n/**\n * Properties for the EntityProvider component.\n *\n * @public\n */\nexport interface EntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n}\n\n/**\n * Provides an entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const EntityProvider = (props: EntityProviderProps) => (\n <AsyncEntityProvider\n entity={props.entity}\n loading={!Boolean(props.entity)}\n error={undefined}\n refresh={undefined}\n children={props.children}\n />\n);\n\n/**\n * Grab the current entity from the context, throws if the entity has not yet been loaded\n * or is not available.\n *\n * @public\n */\nexport function useEntity<TEntity extends Entity = Entity>(): {\n entity: TEntity;\n} {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n if (!value.entity) {\n throw new Error(\n 'useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.',\n );\n }\n\n return { entity: value.entity as TEntity };\n}\n\n/**\n * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.\n *\n * @public\n */\nexport function useAsyncEntity<\n TEntity extends Entity = Entity,\n>(): EntityLoadingStatus<TEntity> {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n const { entity, loading, error, refresh } = value;\n return { entity: entity as TEntity, loading, error, refresh };\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Theme, useMediaQuery } from '@material-ui/core';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstageTheme } from '@backstage/theme';\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n code: {\n borderRadius: 6,\n margin: theme.spacing(2, 0),\n background:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n <>\n <Typography variant=\"body1\">\n No links defined for this entity. You can add links to your entity YAML\n as shown in the highlighted example below:\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n Read more\n </Button>\n </>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: InfoCardVariants;\n}\n\nexport const EntityLinksCard = (props: EntityLinksCardProps) => {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title=\"Links\" variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_createSvgIcon","_default","useStyles","makeStyles","theme","root","maxWidth","padding","spacing","boxTitle","margin","color","palette","textSubtle","arrow","name","BottomLink","props","link","title","onClick","classes","Box","Divider","Link","to","underline","display","alignItems","className","fontWeight","m","Typography","strong","ArrowIcon","SlackLink","slackChannel","href","LinkButton","variant","ErrorBoundary","Component","componentDidCatch","error","errorInfo","console","setState","render","children","state","ErrorPanel","constructor","undefined","noPadding","paddingBottom","header","headerTitle","typography","fontWeightBold","headerSubheader","paddingTop","headerAvatar","headerAction","headerContent","subheader","CardActionsTopRight","withStyles","float","CardActions","VARIANT_STYLES","card","flex","flexDirection","fullHeight","height","gridItem","marginBottom","breakInside","cardContent","InfoCard","divider","deepLink","errorBoundaryProps","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","titleTypographyProps","calculatedStyle","calculatedCardStyle","split","forEach","cardSubTitle","div","data-testid","errProps","Card","style","CardHeader","avatar","content","CardContent","classNames","NewEntityContext","createVersionedContext","AsyncEntityProvider","entity","loading","refresh","value","Provider","createVersionedValueMap","AnalyticsContext","attributes","entityRef","stringifyEntityRef","EntityProvider","Boolean","useEntity","versionedHolder","useVersionedContext","Error","atVersion","useAsyncEntity","svgIcon","fontSize","verticalAlign","IconLink","text","Icon","mr","component","LanguageIcon","flexGrow","target","rel","colDefaults","xs","sm","md","lg","xl","useDynamicColumns","cols","matches","useMediaQuery","breakpoints","up","numOfCols","breakpoint","find","k","LinksGridList","items","ImageList","rowHeight","map","i","ImageListItem","ENTITY_YAML","code","borderRadius","background","type","common","white","EntityLinksEmptyState","CodeSnippet","language","showLineNumbers","highlightedNumbers","customStyle","Button","EntityLinksCard","app","useApp","iconResolver","key","getSystemIcon","links","metadata","length","url"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7893],{96641:function(me,Z,t){t.d(Z,{X2:function(){return Q},h$:function(){return $}});var n=t(52322),E=t(74314),N=t(72388),D=t(29651),x=t(68993),M=t(2784);const X=(0,D.CT)("entity-context"),$=p=>{const{children:f,entity:j,loading:U,error:y,refresh:u}=p,v={entity:j,loading:U,error:y,refresh:u};return(0,n.jsx)(X.Provider,{value:(0,x.E)({1:v}),children:(0,n.jsx)(N.fC,{attributes:{...j?{entityRef:(0,E.eE)(j)}:void 0},children:f})})},ae=p=>_jsx($,{entity:p.entity,loading:!Boolean(p.entity),error:void 0,refresh:void 0,children:p.children});function Q(){const p=(0,D.Vt)("entity-context");if(!p)throw new Error("Entity context is not available");const f=p.atVersion(1);if(!f)throw new Error("EntityContext v1 not available");if(!f.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:f.entity}}function Y(){const p=useVersionedContext("entity-context");if(!p)throw new Error("Entity context is not available");const f=p.atVersion(1);if(!f)throw new Error("EntityContext v1 not available");const{entity:j,loading:U,error:y,refresh:u}=f;return{entity:j,loading:U,error:y,refresh:u}}},37893:function(me,Z,t){t.r(Z),t.d(Z,{AboutCard:function(){return st},AboutContent:function(){return be},AboutField:function(){return L}});var n=t(52322),E=t(34106),N=t(90663),D=t(74314),x=t(79692),M=t(94339),X=t(32552),$=t(61837),ae=t(85256),Q=t(24579),Y=t(98864),p=t(2784),f=t(72779),j=t.n(f),U=t(35292),y=t(62774),u=t(90436);const v=(0,x.Z)(e=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:e.palette.text.secondary,cursor:"default"},primary:{color:e.palette.primary.main},secondary:{color:e.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:e.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function k({color:e="primary",disabled:i=!1,href:a="#",icon:o=(0,n.jsx)(U.Z,{}),label:s,onClick:r,title:l}){const d=v();return i?(0,n.jsxs)(y.Z,{title:l,className:j()(d.link,d.disabled),children:[o,(0,n.jsx)(u.Z,{variant:"caption",component:"span",className:d.label,children:s})]}):(0,n.jsxs)(Y.rU,{title:l,className:j()(d.link,d[e]),to:a,onClick:r,children:[o,(0,n.jsx)(u.Z,{variant:"caption",component:"span",className:d.label,children:s})]})}const b=(0,x.Z)(e=>({links:{margin:e.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:e.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function w(e){const{links:i}=e,a=b();return(0,n.jsx)("nav",{className:a.links,children:i.map((o,s)=>(0,n.jsx)(k,{...o},s+1))})}var h=t(91657),q=t(73250),he=t(80851);const je=e=>{const{type:i}=e,a=(0,he.q)(),o=q.Z;var s;const r=i&&(s=a.getSystemIcon(i))!==null&&s!==void 0?s:o;return(0,n.jsx)(r,{})};var oe=t(44394),ke=t(78847),Le=t(58513),ue=t(37321),Ce=t(96641),Te=t(88624),ye=t(51547);function Ae(e,i){var a;const o=(a=e.metadata.annotations)===null||a===void 0?void 0:a[N.M6];if(o)try{var s;const r=(0,ye.Ou)(o),l=i.byUrl(r.target);return{locationTargetUrl:r.target,integrationType:(s=l)===null||s===void 0?void 0:s.type}}catch{return}}var fe=t(65524),se=t(8709),re=t(75435),le=t(68138),ge=t(60905),Se=t(7089),Ee=t(28865),we=t(60251),Ie=t(9791);const Oe=(0,x.Z)(e=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${e.palette.border}`},"& th, & td":{border:`1px solid ${e.palette.border}`,padding:e.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:e.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:e.palette.background.paper},"& tr":{backgroundColor:e.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:e.palette.background.default},"& a":{color:e.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),ve=(e,i)=>i?typeof i=="string"?e+i:p.Children.toArray(i.props.children).reduce(ve,e):e,V=({level:e,children:i})=>{const s=p.Children.toArray(i).reduce(ve,"").toLocaleLowerCase("en-US").replace(/\W/g,"-");return p.createElement(`h${e}`,{id:s},i)},$e={code:({inline:e,className:i,children:a,...o})=>{const s=String(a).replace(/\n+$/,""),r=/language-(\w+)/.exec(i||"");return!e&&r?(0,n.jsx)(Ie.O,{language:r[1],text:s}):(0,n.jsx)("code",{className:i,...o,children:a})},h1:V,h2:V,h3:V,h4:V,h5:V,h6:V};function Ue(e){const{content:i,dialect:a="gfm",linkTarget:o,transformLinkUri:s,transformImageUri:r,className:l}=e,d=Oe();return(0,n.jsx)(Ee.D,{remarkPlugins:a==="gfm"?[we.Z]:[],className:`${d.markdown} ${l}`,children:i,components:$e,linkTarget:o,transformLinkUri:s,transformImageUri:r})}var Re=t(2532);const Pe=(0,x.Z)(e=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:e.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function L(e){const{label:i,value:a,gridSizes:o,children:s}=e,r=Pe(),l=(0,Re.v)(s,g=>g.getElements()),d=l.length>0?l:(0,n.jsx)(u.Z,{variant:"body2",className:r.value,children:a||"unknown"});return(0,n.jsxs)(ge.Z,{item:!0,...o,children:[(0,n.jsx)(u.Z,{variant:"h2",className:r.label,children:i}),d]})}var Ze=t(24851);const Ne=(0,x.Z)({description:{wordBreak:"break-word"}});function De(e,i,a){if(i==="url"||e.includes("://"))return e;const o=a.type==="file"?`file://${a.target}`:a.target;return i==="file"||a.type==="file"?new URL(e,o).href:o}function be(e){var i,a,o,s,r,l,d,g,C,I,_,O,m,ee,z,B;const{entity:c}=e,H=Ne(),te=c.kind.toLocaleLowerCase("en-US")==="system",G=c.kind.toLocaleLowerCase("en-US")==="resource",S=c.kind.toLocaleLowerCase("en-US")==="component",T=c.kind.toLocaleLowerCase("en-US")==="api",ne=c.kind.toLocaleLowerCase("en-US")==="template",de=c.kind.toLocaleLowerCase("en-US")==="location",pe=c.kind.toLocaleLowerCase("en-US")==="group",K=(0,re.h)(c,se.cz,{kind:"system"}),W=(0,re.h)(c,se.cz,{kind:"component"}),R=(0,re.h)(c,se.cz,{kind:"domain"}),F=(0,re.h)(c,se.S4);let J;try{J=(0,ye.CV)(c)}catch{J=void 0}return(0,n.jsxs)(ge.Z,{container:!0,children:[(0,n.jsx)(L,{label:"Description",gridSizes:{xs:12},children:(0,n.jsx)(Ue,{className:H.description,content:((a=c)===null||a===void 0||(i=a.metadata)===null||i===void 0?void 0:i.description)||"No description"})}),(0,n.jsx)(L,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4},children:F.length>0&&(0,n.jsx)(le.r,{entityRefs:F,defaultKind:"group"})}),(te||R.length>0)&&(0,n.jsx)(L,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4},children:R.length>0&&(0,n.jsx)(le.r,{entityRefs:R,defaultKind:"domain"})}),(T||S||G||K.length>0)&&(0,n.jsx)(L,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4},children:K.length>0&&(0,n.jsx)(le.r,{entityRefs:K,defaultKind:"system"})}),S&&W.length>0&&(0,n.jsx)(L,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4},children:(0,n.jsx)(le.r,{entityRefs:W,defaultKind:"component"})}),(T||S||G||ne||pe||de||typeof((s=c)===null||s===void 0||(o=s.spec)===null||o===void 0?void 0:o.type)=="string")&&(0,n.jsx)(L,{label:"Type",value:(l=c)===null||l===void 0||(r=l.spec)===null||r===void 0?void 0:r.type,gridSizes:{xs:12,sm:6,lg:4}}),(T||S||typeof((g=c)===null||g===void 0||(d=g.spec)===null||d===void 0?void 0:d.lifecycle)=="string")&&(0,n.jsx)(L,{label:"Lifecycle",value:(I=c)===null||I===void 0||(C=I.spec)===null||C===void 0?void 0:C.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,n.jsx)(L,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4},children:(((O=c)===null||O===void 0||(_=O.metadata)===null||_===void 0?void 0:_.tags)||[]).map(A=>(0,n.jsx)(Se.Z,{size:"small",label:A},A))}),de&&(((ee=c)===null||ee===void 0||(m=ee.spec)===null||m===void 0?void 0:m.targets)||((B=c)===null||B===void 0||(z=B.spec)===null||z===void 0?void 0:z.target))&&(0,n.jsx)(L,{label:"Targets",gridSizes:{xs:12},children:(0,n.jsx)(Ze.s,{cols:1,items:(c.spec.targets||[c.spec.target]).map(A=>A).map(A=>{var ie,P;return{text:A,href:De(A,((P=c)===null||P===void 0||(ie=P.spec)===null||ie===void 0?void 0:ie.type)||"unknown",J)}})})})]})}var Me=t(52866),Ve=t(88188),ze=t(30254),Be=t(27604),He=t(27991),Ge=t.n(He),Ke=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),We=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),Fe=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),Je=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","targetRef"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference","deprecated":true},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const xe=new Map,Xe=[We,Ke,Fe,Je];function Qe(e){var i;if(!(!((i=e)===null||i===void 0)&&i.length))throw new TypeError("Unknown error");const a=e[0];throw new TypeError(`${a.instancePath||"<root>"} ${a.message}${a.params?` - ${Object.entries(a.params).map(([o,s])=>`${o}: ${s}`).join(", ")}`:""}`)}function Ye(e,i={}){var a,o;const s=(o=(a=i)===null||a===void 0?void 0:a.disableCache)!==null&&o!==void 0?o:!1,r=s?"":JSON.stringify(e);if(!s){const C=xe.get(r);if(C)return C}const l=qe(e),d=new(Ge())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});l.length&&d.addSchema(l,void 0,void 0,!0);const g=d.compile(e);return s||xe.set(r,g),g}function qe(e){if(typeof e!="object")return[];const i=new Set;e.$id&&i.add(e.$id);const a=new Array,o=[e];for(;o.length;){const s=o.pop();for(const r of _e(s))if(!i.has(r)){i.add(r);const l=Xe.find(d=>d.$id===r);l&&(a.push(l),o.push(l))}}return a}function*_e(e){const i=[e];for(;i.length;){const a=i.pop();if(typeof a=="object"&&a)for(const[o,s]of Object.entries(a))o==="$ref"&&typeof s=="string"?yield s.split("#")[0]:i.push(s)}}function et(e){const i=Ye(e);return a=>{var o,s;if(i(a)===!0)return a;const l=(o=i.errors)===null||o===void 0?void 0:o.filter(d=>["/kind","/apiVersion"].includes(d.instancePath));if(!((s=l)===null||s===void 0)&&s.length&&l.every(d=>d.keyword==="enum"))return!1;throw Qe(i.errors)}}var tt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta3","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"scaffolder.backstage.io/v1beta3","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","parameters":{"required":["name","description","repoUrl"],"backstage:permissions":{"tags":["one","two"]},"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"},"repoUrl":{"title":"Pick a repository","type":"string","ui:field":"RepoUrlPicker"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"},"backstage:permissions":{"tags":["one","two"]}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"${{ parameters.repoUrl }}"},"if":"${{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"${{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["scaffolder.backstage.io/v1beta3"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}}]},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."},"backstage:permissions":{"type":"object","description":"Object used for authorizing the step","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}},"text":{"type":"array","description":"A list of Markdown text blobs, like output data from the template.","items":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"A user friendly display name for the text.","examples":["Output Content"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"content":{"type":"string","description":"The text blob to display in the UI, rendered as Markdown.","examples":["**hey** _I\'m_ Markdown"]}}}}},"additionalProperties":{"type":"string"}}}}}}]}');const nt=et(tt),lt={async check(e){return nt(e)===e}},it=e=>e.apiVersion==="scaffolder.backstage.io/v1beta3"&&e.kind==="Template",at="backstage.io/techdocs-ref",ce="backstage.io/techdocs-entity",ot=(0,x.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function st(e){var i,a,o,s,r,l,d,g,C;const{variant:I}=e,_=(0,he.q)(),O=ot(),{entity:m}=(0,Ce.X2)(),ee=(0,oe.h_)(h.q),z=(0,oe.h_)(Te.A),B=(0,oe.h_)(ke.$),c=(0,oe.h_)(Le.V),H=(0,ue.t)(fe.jU),te=(0,ue.t)(fe.ql),G=Ae(m,ee),S=(i=m.metadata.annotations)===null||i===void 0?void 0:i[E.Tf];let T;if(!((a=m.metadata.annotations)===null||a===void 0)&&a[ce])try{var ne;T=(0,D.of)((ne=m.metadata.annotations)===null||ne===void 0?void 0:ne[ce])}catch{T=void 0}const de={label:"View Source",disabled:!G,icon:(0,n.jsx)(je,{type:(o=G)===null||o===void 0?void 0:o.integrationType}),href:(s=G)===null||s===void 0?void 0:s.locationTargetUrl},pe={label:"View TechDocs",disabled:!(!((r=m.metadata.annotations)===null||r===void 0)&&r[at]||!((l=m.metadata.annotations)===null||l===void 0)&&l[ce])||!H,icon:(0,n.jsx)(ze.Z,{}),href:H&&H(T?{namespace:T.namespace||E.zG,kind:T.kind,name:T.name}:{namespace:m.metadata.namespace||E.zG,kind:m.kind,name:m.metadata.name})},K=[de,pe];if(it(m)){var W;const P=(W=_.getSystemIcon("scaffolder"))!==null&&W!==void 0?W:Ve.Z,rt={label:"Launch Template",icon:(0,n.jsx)(P,{}),disabled:!te,href:te&&te({templateName:m.metadata.name,namespace:m.metadata.namespace||E.zG})};K.push(rt)}let R="";I==="gridItem"?R=O.gridItemCard:I==="fullHeight"&&(R=O.fullHeightCard);let F="";I==="gridItem"?F=O.gridItemCardContent:I==="fullHeight"&&(F=O.fullHeightCardContent);const J=(d=m.metadata.annotations)===null||d===void 0?void 0:d[N.P1],A=((g=J)===null||g===void 0?void 0:g.startsWith("url:"))||((C=J)===null||C===void 0?void 0:C.startsWith("file:")),ie=(0,p.useCallback)(async()=>{try{await z.refreshEntity((0,D.eE)(m)),B.post({message:"Refresh scheduled",severity:"info",display:"transient"})}catch(P){c.post(P)}},[z,B,c,m]);return(0,n.jsxs)(M.Z,{className:R,children:[(0,n.jsx)(X.Z,{title:"About",action:(0,n.jsxs)(n.Fragment,{children:[A&&(0,n.jsx)($.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:ie,children:(0,n.jsx)(Me.Z,{})}),(0,n.jsx)($.Z,{component:Y.rU,"aria-label":"Edit",disabled:!S,title:"Edit Metadata",to:S!=null?S:"#",children:(0,n.jsx)(Be.Z,{})})]}),subheader:(0,n.jsx)(w,{links:K})}),(0,n.jsx)(ae.Z,{}),(0,n.jsx)(Q.Z,{className:F,children:(0,n.jsx)(be,{entity:m})})]})}},24851:function(me,Z,t){t.d(Z,{s:function(){return U}});var n=t(52322),E=t(90348),N=t(11861),D=t(2784),x=t(79692),M=t(62774),X=t(90436),$=t(52160),ae=t(98864);const Q=(0,x.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function Y(y){const{href:u,text:v,Icon:k}=y,b=Q();return(0,n.jsxs)(M.Z,{display:"flex",children:[(0,n.jsx)(M.Z,{mr:1,className:b.svgIcon,children:(0,n.jsx)(X.Z,{component:"div",children:k?(0,n.jsx)(k,{}):(0,n.jsx)($.Z,{})})}),(0,n.jsx)(M.Z,{flexGrow:"1",children:(0,n.jsx)(ae.rU,{to:u,target:"_blank",rel:"noopener",children:v||u})})]})}var p=t(41156);const f={xs:1,sm:1,md:1,lg:2,xl:3};function j(y){const u=[(0,p.Z)(h=>h.breakpoints.up("xl"))?"xl":null,(0,p.Z)(h=>h.breakpoints.up("lg"))?"lg":null,(0,p.Z)(h=>h.breakpoints.up("md"))?"md":null,(0,p.Z)(h=>h.breakpoints.up("sm"))?"sm":null,(0,p.Z)(h=>h.breakpoints.up("xs"))?"xs":null];let v=1;if(typeof y=="number")v=y;else{var k,b;const h=(b=u.find(q=>q!==null))!==null&&b!==void 0?b:"xs";var w;v=(w=(k=y)===null||k===void 0?void 0:k[h])!==null&&w!==void 0?w:f[h]}return v}function U(y){const{items:u,cols:v=void 0}=y,k=j(v);return(0,n.jsx)(E.Z,{rowHeight:"auto",cols:k,children:u.map(({text:b,href:w,Icon:h},q)=>(0,n.jsx)(N.Z,{children:(0,n.jsx)(Y,{href:w,text:b!=null?b:w,Icon:h})},q))})}}}]);})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=7893.67e0b03f.chunk.js.map
|