@backstage/plugin-techdocs 0.0.0-nightly-20230128022742 → 0.0.0-nightly-20230129023043
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 +11 -7
- package/dist/esm/{TechDocsCustomHome-4797a9b1.esm.js → TechDocsCustomHome-3d0c007b.esm.js} +3 -3
- package/dist/esm/{TechDocsCustomHome-4797a9b1.esm.js.map → TechDocsCustomHome-3d0c007b.esm.js.map} +1 -1
- package/dist/esm/{index-c8c3fb5d.esm.js → index-6e30a638.esm.js} +3 -3
- package/dist/esm/index-6e30a638.esm.js.map +1 -0
- package/dist/esm/{index-e3782e53.esm.js → index-c592d392.esm.js} +25 -17
- package/dist/esm/index-c592d392.esm.js.map +1 -0
- package/dist/index.d.ts +23 -23
- package/dist/index.esm.js +2 -2
- package/package.json +10 -10
- package/dist/esm/index-c8c3fb5d.esm.js.map +0 -1
- package/dist/esm/index-e3782e53.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
# @backstage/plugin-techdocs
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20230129023043
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0eaa579f89: The `TechDocsSearchResultListItem` component is now a search result extension. This means that when rendered as a child of components that render search extensions, the `result`, `rank`, and `highlight` properties are optional. See the [documentation](https://backstage.io/docs/features/search/how-to-guides#how-to-render-search-results-using-extensions) for more details.
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
7
11
|
- c8e09cc383: Fixed bug in Techdocs reader where a techdocs page with a hash in the URL did not always jump to the document anchor.
|
|
8
12
|
- cad5607411: Improve view: remove footer overlay on large screen
|
|
9
13
|
- Updated dependencies
|
|
10
|
-
- @backstage/plugin-catalog-react@0.0.0-nightly-
|
|
11
|
-
- @backstage/core-components@0.0.0-nightly-
|
|
12
|
-
- @backstage/catalog-model@0.0.0-nightly-
|
|
14
|
+
- @backstage/plugin-catalog-react@0.0.0-nightly-20230129023043
|
|
15
|
+
- @backstage/core-components@0.0.0-nightly-20230129023043
|
|
16
|
+
- @backstage/catalog-model@0.0.0-nightly-20230129023043
|
|
17
|
+
- @backstage/plugin-search-react@0.0.0-nightly-20230129023043
|
|
13
18
|
- @backstage/config@1.0.6
|
|
14
19
|
- @backstage/core-plugin-api@1.3.0
|
|
15
20
|
- @backstage/errors@1.1.4
|
|
16
21
|
- @backstage/integration@1.4.2
|
|
17
|
-
- @backstage/integration-react@0.0.0-nightly-
|
|
22
|
+
- @backstage/integration-react@0.0.0-nightly-20230129023043
|
|
18
23
|
- @backstage/theme@0.2.16
|
|
19
24
|
- @backstage/plugin-search-common@1.2.1
|
|
20
|
-
- @backstage/plugin-
|
|
21
|
-
- @backstage/plugin-techdocs-react@0.0.0-nightly-20230128022742
|
|
25
|
+
- @backstage/plugin-techdocs-react@0.0.0-nightly-20230129023043
|
|
22
26
|
|
|
23
27
|
## 1.4.4-next.0
|
|
24
28
|
|
|
@@ -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-c592d392.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';
|
|
@@ -10,8 +10,8 @@ import 'event-source-polyfill';
|
|
|
10
10
|
import 'react-router-dom';
|
|
11
11
|
import '@backstage/plugin-techdocs-react';
|
|
12
12
|
import 'react-use/lib/useAsyncRetry';
|
|
13
|
-
import '@material-ui/core/Typography';
|
|
14
13
|
import '@backstage/plugin-search-react';
|
|
14
|
+
import '@material-ui/core/Typography';
|
|
15
15
|
import '@material-ui/lab';
|
|
16
16
|
import '@material-ui/icons/Close';
|
|
17
17
|
import '@backstage/integration-react';
|
|
@@ -125,4 +125,4 @@ const TechDocsCustomHome = (props) => {
|
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
export { TechDocsCustomHome };
|
|
128
|
-
//# sourceMappingURL=TechDocsCustomHome-
|
|
128
|
+
//# sourceMappingURL=TechDocsCustomHome-3d0c007b.esm.js.map
|
package/dist/esm/{TechDocsCustomHome-4797a9b1.esm.js.map → TechDocsCustomHome-3d0c007b.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechDocsCustomHome-
|
|
1
|
+
{"version":3,"file":"TechDocsCustomHome-3d0c007b.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,MAAS,GAAA;AAAA,EACb,SAAA;AAAA,EACA,YAAA;AACF,CAAA,CAAA;AAuCA,MAAM,cAAc,CAAC;AAAA,EACnB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AACF,CAIM,KAAA;AACJ,EAAA,MAAM,YAAY,UAAW,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as TechDocsReaderPage } from './index-c592d392.esm.js';
|
|
2
2
|
import '@backstage/core-plugin-api';
|
|
3
3
|
import '@backstage/errors';
|
|
4
4
|
import 'event-source-polyfill';
|
|
@@ -9,8 +9,8 @@ import 'react-use/lib/useAsync';
|
|
|
9
9
|
import 'react-use/lib/useAsyncRetry';
|
|
10
10
|
import '@backstage/core-components';
|
|
11
11
|
import '@material-ui/core';
|
|
12
|
-
import '@material-ui/core/Typography';
|
|
13
12
|
import '@backstage/plugin-search-react';
|
|
13
|
+
import '@material-ui/core/Typography';
|
|
14
14
|
import '@material-ui/lab';
|
|
15
15
|
import '@material-ui/icons/Close';
|
|
16
16
|
import '@backstage/integration-react';
|
|
@@ -32,4 +32,4 @@ import '@material-ui/icons/Share';
|
|
|
32
32
|
import '@material-ui/styles';
|
|
33
33
|
import '@material-ui/icons/Star';
|
|
34
34
|
import '@material-ui/icons/StarBorder';
|
|
35
|
-
//# sourceMappingURL=index-
|
|
35
|
+
//# sourceMappingURL=index-6e30a638.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-6e30a638.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createApiRef, useApi,
|
|
1
|
+
import { createApiRef, useApi, configApiRef, useAnalytics, createRouteRef, useRouteRef, useRouteRefParams, getComponentData, createPlugin, createApiFactory, discoveryApiRef, identityApiRef, fetchApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
|
|
2
2
|
import { ResponseError, NotFoundError } from '@backstage/errors';
|
|
3
3
|
import { EventSourcePolyfill } from 'event-source-polyfill';
|
|
4
4
|
import React, { useReducer, useRef, useMemo, createContext, useContext, useState, useEffect, useCallback, Children } from 'react';
|
|
@@ -8,8 +8,8 @@ import useAsync from 'react-use/lib/useAsync';
|
|
|
8
8
|
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
|
9
9
|
import { Link, LogViewer, ErrorPage, useSidebarPinState, Content, HeaderLabel, Header, Page, ItemCardGrid, ItemCardHeader, Button as Button$2, WarningPanel, CodeSnippet, Progress, ContentHeader, SubvalueCell, Table, EmptyState, PageWithHeader, SupportButton, MissingAnnotationEmptyState } from '@backstage/core-components';
|
|
10
10
|
import { makeStyles, ListItemText, ListItem, ListItemIcon, Divider, Paper, createStyles, Button, Drawer, Grid, Typography as Typography$1, IconButton, CircularProgress, lighten, alpha, useTheme, withStyles, Tooltip, ThemeProvider, SvgIcon, useMediaQuery, Portal, Toolbar, Box, Menu, Card, CardMedia, CardContent, CardActions } from '@material-ui/core';
|
|
11
|
+
import { HighlightedSearchResultText, SearchContextProvider, useSearch, SearchAutocomplete, createSearchResultListItemExtension } from '@backstage/plugin-search-react';
|
|
11
12
|
import Typography from '@material-ui/core/Typography';
|
|
12
|
-
import { HighlightedSearchResultText, SearchContextProvider, useSearch, SearchAutocomplete } from '@backstage/plugin-search-react';
|
|
13
13
|
import { Alert, Skeleton } from '@material-ui/lab';
|
|
14
14
|
import Close from '@material-ui/icons/Close';
|
|
15
15
|
import { scmIntegrationsApiRef } from '@backstage/integration-react';
|
|
@@ -364,11 +364,10 @@ const useStyles$4 = makeStyles({
|
|
|
364
364
|
marginBottom: "1rem"
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
|
-
const TechDocsSearchResultListItem = (props) => {
|
|
367
|
+
const TechDocsSearchResultListItem$1 = (props) => {
|
|
368
368
|
const {
|
|
369
369
|
result,
|
|
370
370
|
highlight,
|
|
371
|
-
rank,
|
|
372
371
|
lineClamp = 5,
|
|
373
372
|
asListItem = true,
|
|
374
373
|
asLink = true,
|
|
@@ -376,14 +375,7 @@ const TechDocsSearchResultListItem = (props) => {
|
|
|
376
375
|
icon
|
|
377
376
|
} = props;
|
|
378
377
|
const classes = useStyles$4();
|
|
379
|
-
const
|
|
380
|
-
const handleClick = () => {
|
|
381
|
-
analytics.captureEvent("discover", result.title, {
|
|
382
|
-
attributes: { to: result.location },
|
|
383
|
-
value: rank
|
|
384
|
-
});
|
|
385
|
-
};
|
|
386
|
-
const LinkWrapper = ({ children }) => asLink ? /* @__PURE__ */ React.createElement(Link, { noTrack: true, to: result.location, onClick: handleClick }, children) : /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
378
|
+
const LinkWrapper = ({ children }) => asLink ? /* @__PURE__ */ React.createElement(Link, { noTrack: true, to: result.location }, children) : /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
387
379
|
const TextItem = () => {
|
|
388
380
|
const resultTitle = (highlight == null ? void 0 : highlight.fields.title) ? /* @__PURE__ */ React.createElement(
|
|
389
381
|
HighlightedSearchResultText,
|
|
@@ -409,6 +401,8 @@ const TechDocsSearchResultListItem = (props) => {
|
|
|
409
401
|
postTag: highlight.postTag
|
|
410
402
|
}
|
|
411
403
|
) : result.name;
|
|
404
|
+
if (!result)
|
|
405
|
+
return null;
|
|
412
406
|
return /* @__PURE__ */ React.createElement(
|
|
413
407
|
ListItemText,
|
|
414
408
|
{
|
|
@@ -442,6 +436,11 @@ const TechDocsSearchResultListItem = (props) => {
|
|
|
442
436
|
return /* @__PURE__ */ React.createElement(ListItemWrapper, null, /* @__PURE__ */ React.createElement(TextItem, null));
|
|
443
437
|
};
|
|
444
438
|
|
|
439
|
+
var TechDocsSearchResultListItem$2 = /*#__PURE__*/Object.freeze({
|
|
440
|
+
__proto__: null,
|
|
441
|
+
TechDocsSearchResultListItem: TechDocsSearchResultListItem$1
|
|
442
|
+
});
|
|
443
|
+
|
|
445
444
|
const useStyles$3 = makeStyles((theme) => ({
|
|
446
445
|
root: {
|
|
447
446
|
width: "100%"
|
|
@@ -513,7 +512,7 @@ const TechDocsSearchBar = (props) => {
|
|
|
513
512
|
value: null,
|
|
514
513
|
options,
|
|
515
514
|
renderOption: ({ document, highlight }) => /* @__PURE__ */ React.createElement(
|
|
516
|
-
TechDocsSearchResultListItem,
|
|
515
|
+
TechDocsSearchResultListItem$1,
|
|
517
516
|
{
|
|
518
517
|
result: document,
|
|
519
518
|
lineClamp: 3,
|
|
@@ -2457,7 +2456,7 @@ const EntityTechdocsContent = techdocsPlugin.provide(
|
|
|
2457
2456
|
const TechDocsCustomHome = techdocsPlugin.provide(
|
|
2458
2457
|
createRoutableExtension({
|
|
2459
2458
|
name: "TechDocsCustomHome",
|
|
2460
|
-
component: () => import('./TechDocsCustomHome-
|
|
2459
|
+
component: () => import('./TechDocsCustomHome-3d0c007b.esm.js').then(
|
|
2461
2460
|
(m) => m.TechDocsCustomHome
|
|
2462
2461
|
),
|
|
2463
2462
|
mountPoint: rootRouteRef
|
|
@@ -2475,12 +2474,21 @@ const TechDocsIndexPage$2 = techdocsPlugin.provide(
|
|
|
2475
2474
|
const TechDocsReaderPage = techdocsPlugin.provide(
|
|
2476
2475
|
createRoutableExtension({
|
|
2477
2476
|
name: "TechDocsReaderPage",
|
|
2478
|
-
component: () => import('./index-
|
|
2477
|
+
component: () => import('./index-6e30a638.esm.js').then(
|
|
2479
2478
|
(m) => m.TechDocsReaderPage
|
|
2480
2479
|
),
|
|
2481
2480
|
mountPoint: rootDocsRouteRef
|
|
2482
2481
|
})
|
|
2483
2482
|
);
|
|
2483
|
+
const TechDocsSearchResultListItem = techdocsPlugin.provide(
|
|
2484
|
+
createSearchResultListItemExtension({
|
|
2485
|
+
name: "TechDocsSearchResultListItem",
|
|
2486
|
+
component: () => Promise.resolve().then(function () { return TechDocsSearchResultListItem$2; }).then(
|
|
2487
|
+
(m) => m.TechDocsSearchResultListItem
|
|
2488
|
+
),
|
|
2489
|
+
predicate: (result) => result.type === "techdocs"
|
|
2490
|
+
})
|
|
2491
|
+
);
|
|
2484
2492
|
|
|
2485
2493
|
const EntityPageDocs = ({ entity }) => {
|
|
2486
2494
|
const entityRef = getCompoundEntityRef(entity);
|
|
@@ -2541,5 +2549,5 @@ var Router$1 = /*#__PURE__*/Object.freeze({
|
|
|
2541
2549
|
EmbeddedDocsRouter: EmbeddedDocsRouter
|
|
2542
2550
|
});
|
|
2543
2551
|
|
|
2544
|
-
export { 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,
|
|
2545
|
-
//# sourceMappingURL=index-
|
|
2552
|
+
export { 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, TechDocsSearchResultListItem as h, techdocsStorageApiRef as i, techdocsApiRef as j, TechDocsClient as k, TechDocsStorageClient as l, TechDocsReaderProvider as m, TechDocsReaderPageHeader as n, TechDocsReaderPageContent as o, TechDocsReaderPageSubheader as p, TechDocsSearch as q, EntityListDocsGrid as r, EntityListDocsTable as s, techdocsPlugin as t, DefaultTechDocsHome as u, TechDocsPicker as v, isTechDocsAvailable as w, Router as x, EmbeddedDocsRouter as y };
|
|
2553
|
+
//# sourceMappingURL=index-c592d392.esm.js.map
|