@backstage/plugin-techdocs 0.0.0-nightly-20220507023751 → 0.0.0-nightly-20220510022953
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 +12 -9
- package/dist/esm/{TechDocsCustomHome-e3ec7aed.esm.js → TechDocsCustomHome-968d179e.esm.js} +2 -3
- package/dist/esm/{TechDocsCustomHome-e3ec7aed.esm.js.map → TechDocsCustomHome-968d179e.esm.js.map} +1 -1
- package/dist/esm/{index-76cc1cd7.esm.js → index-913b47d9.esm.js} +37 -16
- package/dist/esm/index-913b47d9.esm.js.map +1 -0
- package/dist/esm/{index-998ae86b.esm.js → index-9f90aba8.esm.js} +2 -3
- package/dist/esm/index-9f90aba8.esm.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +1 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -14
- package/dist/esm/index-76cc1cd7.esm.js.map +0 -1
- package/dist/esm/index-998ae86b.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
# @backstage/plugin-techdocs
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220510022953
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 1af133f779: Updated dependency `event-source-polyfill` to `1.0.26`.
|
|
8
8
|
- a307a14be0: Removed dependency on `@backstage/core-app-api`.
|
|
9
9
|
- bed0d64ce9: Fixed bugs that prevented a 404 error from being shown when it should have been.
|
|
10
|
+
- 2dcb2c9678: Loading SVGs correctly with `bota` with extended characters
|
|
10
11
|
- 52fddad92d: The `TechDocsStorageApi` and its associated ref are now exported by `@backstage/plugin-techdocs-react`. The API interface, ref, and types are now deprecated in `@backstage/plugin-techdocs` and will be removed in a future release.
|
|
12
|
+
- 3a74e203a8: Updated search result components to support rendering content with highlighted matched terms
|
|
11
13
|
- Updated dependencies
|
|
12
|
-
- @backstage/core-components@0.0.0-nightly-
|
|
13
|
-
- @backstage/core-plugin-api@0.0.0-nightly-
|
|
14
|
-
- @backstage/integration@0.0.0-nightly-
|
|
15
|
-
- @backstage/plugin-catalog-react@0.0.0-nightly-
|
|
16
|
-
- @backstage/integration-react@0.0.0-nightly-
|
|
17
|
-
- @backstage/config@0.0.0-nightly-
|
|
18
|
-
- @backstage/plugin-search-react@0.0.0-nightly-
|
|
19
|
-
- @backstage/plugin-techdocs-react@0.0.0-nightly-
|
|
14
|
+
- @backstage/core-components@0.0.0-nightly-20220510022953
|
|
15
|
+
- @backstage/core-plugin-api@0.0.0-nightly-20220510022953
|
|
16
|
+
- @backstage/integration@0.0.0-nightly-20220510022953
|
|
17
|
+
- @backstage/plugin-catalog-react@0.0.0-nightly-20220510022953
|
|
18
|
+
- @backstage/integration-react@0.0.0-nightly-20220510022953
|
|
19
|
+
- @backstage/config@0.0.0-nightly-20220510022953
|
|
20
|
+
- @backstage/plugin-search-react@0.0.0-nightly-20220510022953
|
|
21
|
+
- @backstage/plugin-techdocs-react@0.0.0-nightly-20220510022953
|
|
22
|
+
- @backstage/plugin-search-common@0.0.0-nightly-20220510022953
|
|
20
23
|
|
|
21
24
|
## 1.1.1-next.1
|
|
22
25
|
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import useAsync from 'react-use/lib/useAsync';
|
|
3
3
|
import { makeStyles } from '@material-ui/core';
|
|
4
4
|
import { catalogApiRef, CATALOG_FILTER_EXISTS, useEntityOwnership } from '@backstage/plugin-catalog-react';
|
|
5
|
-
import { T as TechDocsPageWrapper, D as DocsTable, a as DocsCardGrid } from './index-
|
|
5
|
+
import { T as TechDocsPageWrapper, D as DocsTable, a as DocsCardGrid } from './index-913b47d9.esm.js';
|
|
6
6
|
import { Content, Progress, WarningPanel, CodeSnippet, HeaderTabs, ContentHeader, SupportButton } from '@backstage/core-components';
|
|
7
7
|
import { useApi } from '@backstage/core-plugin-api';
|
|
8
8
|
import '@backstage/errors';
|
|
@@ -11,7 +11,6 @@ import 'react-router-dom';
|
|
|
11
11
|
import '@backstage/plugin-techdocs-react';
|
|
12
12
|
import 'jss';
|
|
13
13
|
import '@material-ui/styles';
|
|
14
|
-
import 'react-text-truncate';
|
|
15
14
|
import '@backstage/plugin-search-react';
|
|
16
15
|
import '@material-ui/icons/Search';
|
|
17
16
|
import '@material-ui/lab/Autocomplete';
|
|
@@ -132,4 +131,4 @@ const TechDocsCustomHome = (props) => {
|
|
|
132
131
|
};
|
|
133
132
|
|
|
134
133
|
export { TechDocsCustomHome };
|
|
135
|
-
//# sourceMappingURL=TechDocsCustomHome-
|
|
134
|
+
//# sourceMappingURL=TechDocsCustomHome-968d179e.esm.js.map
|
package/dist/esm/{TechDocsCustomHome-e3ec7aed.esm.js.map → TechDocsCustomHome-968d179e.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsCustomHome-
|
|
1
|
+
{"version":3,"file":"TechDocsCustomHome-968d179e.esm.js","sources":["../../src/home/components/TechDocsCustomHome.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, { useState } from 'react';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { CSSProperties } from '@material-ui/styles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n 'metadata.annotations.backstage.io/techdocs-ref': CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.['backstage.io/techdocs-ref'];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,MAAM,GAAG;AACf,EAAE,SAAS;AACX,EAAE,YAAY;AACd,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,CAAC;AACrB,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,KAAK;AACP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B,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACrG,IAAI,GAAG,EAAE,KAAK;AACd,IAAI,MAAM;AACV,IAAI,QAAQ,EAAE,CAAC,CAAC,QAAQ,GAAG,QAAQ,GAAG,EAAE;AACxC,IAAI,KAAK;AACT,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACR;;;;"}
|
|
@@ -8,8 +8,7 @@ import { techdocsStorageApiRef as techdocsStorageApiRef$1, useTechDocsReaderPage
|
|
|
8
8
|
import { create } from 'jss';
|
|
9
9
|
import { makeStyles, ListItemText, ListItem, Divider, TextField, InputAdornment, IconButton, CircularProgress, createStyles, Button, Drawer, Grid, Typography, withStyles, Tooltip, ThemeProvider, SvgIcon, useTheme, Portal, Toolbar, Box, Card, CardMedia, CardContent, CardActions } from '@material-ui/core';
|
|
10
10
|
import { jssPreset, StylesProvider, withStyles as withStyles$1 } from '@material-ui/styles';
|
|
11
|
-
import
|
|
12
|
-
import { SearchContextProvider, useSearch } from '@backstage/plugin-search-react';
|
|
11
|
+
import { HighlightedSearchResultText, SearchContextProvider, useSearch } from '@backstage/plugin-search-react';
|
|
13
12
|
import SearchIcon from '@material-ui/icons/Search';
|
|
14
13
|
import Autocomplete from '@material-ui/lab/Autocomplete';
|
|
15
14
|
import { useNavigate, useOutlet as useOutlet$1 } from 'react-router';
|
|
@@ -165,6 +164,7 @@ const useStyles$4 = makeStyles({
|
|
|
165
164
|
const TechDocsSearchResultListItem = (props) => {
|
|
166
165
|
const {
|
|
167
166
|
result,
|
|
167
|
+
highlight,
|
|
168
168
|
lineClamp = 5,
|
|
169
169
|
asListItem = true,
|
|
170
170
|
asLink = true,
|
|
@@ -172,17 +172,37 @@ const TechDocsSearchResultListItem = (props) => {
|
|
|
172
172
|
} = props;
|
|
173
173
|
const classes = useStyles$4();
|
|
174
174
|
const TextItem = () => {
|
|
175
|
-
|
|
175
|
+
const resultTitle = (highlight == null ? void 0 : highlight.fields.title) ? /* @__PURE__ */ React.createElement(HighlightedSearchResultText, {
|
|
176
|
+
text: highlight.fields.title,
|
|
177
|
+
preTag: highlight.preTag,
|
|
178
|
+
postTag: highlight.postTag
|
|
179
|
+
}) : result.title;
|
|
180
|
+
const entityTitle = (highlight == null ? void 0 : highlight.fields.entityTitle) ? /* @__PURE__ */ React.createElement(HighlightedSearchResultText, {
|
|
181
|
+
text: highlight.fields.entityTitle,
|
|
182
|
+
preTag: highlight.preTag,
|
|
183
|
+
postTag: highlight.postTag
|
|
184
|
+
}) : result.entityTitle;
|
|
185
|
+
const resultName = (highlight == null ? void 0 : highlight.fields.name) ? /* @__PURE__ */ React.createElement(HighlightedSearchResultText, {
|
|
186
|
+
text: highlight.fields.name,
|
|
187
|
+
preTag: highlight.preTag,
|
|
188
|
+
postTag: highlight.postTag
|
|
189
|
+
}) : result.name;
|
|
176
190
|
return /* @__PURE__ */ React.createElement(ListItemText, {
|
|
177
191
|
className: classes.itemText,
|
|
178
192
|
primaryTypographyProps: { variant: "h6" },
|
|
179
|
-
primary: title ? title :
|
|
180
|
-
secondary: /* @__PURE__ */ React.createElement(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
193
|
+
primary: title ? title : /* @__PURE__ */ React.createElement(React.Fragment, null, resultTitle, " | ", entityTitle != null ? entityTitle : resultName, " docs"),
|
|
194
|
+
secondary: /* @__PURE__ */ React.createElement("span", {
|
|
195
|
+
style: {
|
|
196
|
+
display: "-webkit-box",
|
|
197
|
+
WebkitBoxOrient: "vertical",
|
|
198
|
+
WebkitLineClamp: lineClamp,
|
|
199
|
+
overflow: "hidden"
|
|
200
|
+
}
|
|
201
|
+
}, (highlight == null ? void 0 : highlight.fields.text) ? /* @__PURE__ */ React.createElement(HighlightedSearchResultText, {
|
|
202
|
+
text: highlight.fields.text,
|
|
203
|
+
preTag: highlight.preTag,
|
|
204
|
+
postTag: highlight.postTag
|
|
205
|
+
}) : result.text)
|
|
186
206
|
});
|
|
187
207
|
};
|
|
188
208
|
const LinkWrapper = ({ children }) => asLink ? /* @__PURE__ */ React.createElement(Link, {
|
|
@@ -269,12 +289,13 @@ const TechDocsSearchBar = (props) => {
|
|
|
269
289
|
noOptionsText: "No results found",
|
|
270
290
|
value: null,
|
|
271
291
|
options,
|
|
272
|
-
renderOption: ({ document }) => /* @__PURE__ */ React.createElement(TechDocsSearchResultListItem, {
|
|
292
|
+
renderOption: ({ document, highlight }) => /* @__PURE__ */ React.createElement(TechDocsSearchResultListItem, {
|
|
273
293
|
result: document,
|
|
274
294
|
lineClamp: 3,
|
|
275
295
|
asListItem: false,
|
|
276
296
|
asLink: false,
|
|
277
|
-
title: document.title
|
|
297
|
+
title: document.title,
|
|
298
|
+
highlight
|
|
278
299
|
}),
|
|
279
300
|
loading,
|
|
280
301
|
renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
|
|
@@ -664,7 +685,7 @@ const addBaseUrl = ({
|
|
|
664
685
|
try {
|
|
665
686
|
const svg = await fetch(newValue, { credentials: "include" });
|
|
666
687
|
const svgContent = await svg.text();
|
|
667
|
-
elem.setAttribute(attributeName, `data:image/svg+xml;base64,${btoa(svgContent)}`);
|
|
688
|
+
elem.setAttribute(attributeName, `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(svgContent)))}`);
|
|
668
689
|
} catch (e) {
|
|
669
690
|
elem.setAttribute("alt", `Error: ${elemAttribute}`);
|
|
670
691
|
}
|
|
@@ -2138,7 +2159,7 @@ const EntityTechdocsContent = techdocsPlugin.provide(createRoutableExtension({
|
|
|
2138
2159
|
}));
|
|
2139
2160
|
const TechDocsCustomHome = techdocsPlugin.provide(createRoutableExtension({
|
|
2140
2161
|
name: "TechDocsCustomHome",
|
|
2141
|
-
component: () => import('./TechDocsCustomHome-
|
|
2162
|
+
component: () => import('./TechDocsCustomHome-968d179e.esm.js').then((m) => m.TechDocsCustomHome),
|
|
2142
2163
|
mountPoint: rootRouteRef
|
|
2143
2164
|
}));
|
|
2144
2165
|
const TechDocsIndexPage$2 = techdocsPlugin.provide(createRoutableExtension({
|
|
@@ -2148,7 +2169,7 @@ const TechDocsIndexPage$2 = techdocsPlugin.provide(createRoutableExtension({
|
|
|
2148
2169
|
}));
|
|
2149
2170
|
const TechDocsReaderPage = techdocsPlugin.provide(createRoutableExtension({
|
|
2150
2171
|
name: "TechDocsReaderPage",
|
|
2151
|
-
component: () => import('./index-
|
|
2172
|
+
component: () => import('./index-9f90aba8.esm.js').then((m) => m.TechDocsReaderPage),
|
|
2152
2173
|
mountPoint: rootDocsRouteRef
|
|
2153
2174
|
}));
|
|
2154
2175
|
|
|
@@ -2210,4 +2231,4 @@ var Router$1 = /*#__PURE__*/Object.freeze({
|
|
|
2210
2231
|
});
|
|
2211
2232
|
|
|
2212
2233
|
export { isTechDocsAvailable as A, Router as B, EmbeddedDocsRouter as C, DocsTable as D, EntityTechdocsContent as E, Reader as R, TechDocsPageWrapper as T, DocsCardGrid as a, TechDocsReaderPage$1 as b, TechDocsReaderLayout as c, TechDocsCustomHome as d, TechDocsIndexPage$2 as e, TechdocsPage as f, TechDocsReaderPage as g, techdocsStorageApiRef as h, techdocsApiRef as i, TechDocsClient as j, TechDocsStorageClient as k, TechDocsReaderPageHeader as l, TechDocsReaderPageContent as m, TechDocsReaderProvider as n, useTechDocsReaderDom as o, TechDocsReaderPageSubheader as p, TechDocsStateIndicator as q, TechDocsSearchResultListItem as r, TechDocsSearch as s, techdocsPlugin as t, useTechDocsReader as u, EntityListDocsGrid as v, withTechDocsReaderProvider as w, EntityListDocsTable as x, DefaultTechDocsHome as y, TechDocsPicker as z };
|
|
2213
|
-
//# sourceMappingURL=index-
|
|
2234
|
+
//# sourceMappingURL=index-913b47d9.esm.js.map
|