@backstage/plugin-techdocs 1.8.0 → 1.8.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.d.ts +9 -2
- package/dist/alpha.esm.js +58 -43
- package/dist/alpha.esm.js.map +1 -1
- package/dist/esm/DocsCardGrid-66754d32.esm.js +41 -0
- package/dist/esm/DocsCardGrid-66754d32.esm.js.map +1 -0
- package/dist/esm/Router-1532ca7a.esm.js +163 -0
- package/dist/esm/Router-1532ca7a.esm.js.map +1 -0
- package/dist/esm/{TechDocsCustomHome-63a41580.esm.js → TechDocsCustomHome-114f3198.esm.js} +6 -26
- package/dist/esm/{TechDocsCustomHome-63a41580.esm.js.map → TechDocsCustomHome-114f3198.esm.js.map} +1 -1
- package/dist/esm/{TechDocsIndexPage-f0a2b203.esm.js → TechDocsIndexPage-a43a1a1c.esm.js} +3 -3
- package/dist/esm/{TechDocsIndexPage-f0a2b203.esm.js.map → TechDocsIndexPage-a43a1a1c.esm.js.map} +1 -1
- package/dist/esm/{TechDocsReaderPage-ac1d5884.esm.js → TechDocsReaderPage-89ab8b88.esm.js} +30 -33
- package/dist/esm/TechDocsReaderPage-89ab8b88.esm.js.map +1 -0
- package/dist/esm/{index-a1239e83.esm.js → index-9eca466a.esm.js} +5 -3
- package/dist/esm/index-9eca466a.esm.js.map +1 -0
- package/dist/esm/{client-3113b6a6.esm.js → routes-691e552c.esm.js} +14 -2
- package/dist/esm/routes-691e552c.esm.js.map +1 -0
- package/dist/index.esm.js +15 -197
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -17
- package/dist/esm/TechDocsReaderPage-ac1d5884.esm.js.map +0 -1
- package/dist/esm/client-3113b6a6.esm.js.map +0 -1
- package/dist/esm/index-a1239e83.esm.js.map +0 -1
- package/dist/esm/routes-f8adf6c9.esm.js +0 -15
- package/dist/esm/routes-f8adf6c9.esm.js.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { createApiRef
|
|
2
|
-
|
|
3
|
-
export { a as
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { ItemCardGrid, ItemCardHeader, LinkButton, WarningPanel, CodeSnippet, Progress, Link, Content, ContentHeader, MissingAnnotationEmptyState } from '@backstage/core-components';
|
|
10
|
-
import { Card, CardMedia, CardContent, CardActions, Typography } from '@material-ui/core';
|
|
1
|
+
import { createApiRef } from '@backstage/core-plugin-api';
|
|
2
|
+
export { T as TechDocsClient, a as TechDocsStorageClient } from './esm/routes-691e552c.esm.js';
|
|
3
|
+
export { R as Reader, a as TechDocsReaderLayout, c as TechDocsReaderPageContent, b as TechDocsReaderPageHeader, d as TechDocsReaderPageSubheader, T as TechDocsReaderProvider, e as TechDocsSearch } from './esm/TechDocsReaderPage-89ab8b88.esm.js';
|
|
4
|
+
import { D as DocsCardGrid } from './esm/DocsCardGrid-66754d32.esm.js';
|
|
5
|
+
export { D as DocsCardGrid } from './esm/DocsCardGrid-66754d32.esm.js';
|
|
6
|
+
import { WarningPanel, CodeSnippet, Progress, Link, Content, ContentHeader } from '@backstage/core-components';
|
|
7
|
+
import { useEntityList, useEntityOwnership } from '@backstage/plugin-catalog-react';
|
|
8
|
+
import { Typography } from '@material-ui/core';
|
|
11
9
|
import React from 'react';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { createSearchResultListItemExtension } from '@backstage/plugin-search-react';
|
|
15
|
-
import { Routes, Route, useRoutes } from 'react-router-dom';
|
|
16
|
-
import { getCompoundEntityRef, parseEntityRef } from '@backstage/catalog-model';
|
|
10
|
+
export { a as DefaultTechDocsHome, D as DocsTable, E as EntityListDocsTable, T as TechDocsPageWrapper, b as TechDocsPicker } from './esm/TechDocsIndexPage-a43a1a1c.esm.js';
|
|
11
|
+
export { e as EmbeddedDocsRouter, E as EntityTechdocsContent, R as Router, T as TechDocsCustomHome, a as TechDocsIndexPage, c as TechDocsReaderPage, d as TechDocsSearchResultListItem, b as TechdocsPage, i as isTechDocsAvailable, t as plugin, t as techdocsPlugin } from './esm/Router-1532ca7a.esm.js';
|
|
17
12
|
import '@backstage/errors';
|
|
18
13
|
import 'event-source-polyfill';
|
|
14
|
+
import 'react-router-dom';
|
|
15
|
+
import '@backstage/plugin-techdocs-react';
|
|
16
|
+
import '@backstage/plugin-search-react';
|
|
19
17
|
import './esm/TechDocsSearchResultListItem-4736f829.esm.js';
|
|
20
18
|
import '@material-ui/core/Typography';
|
|
21
19
|
import '@material-ui/lab';
|
|
@@ -33,6 +31,7 @@ import 'react-use/lib/useCopyToClipboard';
|
|
|
33
31
|
import 'react-helmet';
|
|
34
32
|
import '@material-ui/core/styles';
|
|
35
33
|
import '@material-ui/icons/Code';
|
|
34
|
+
import '@backstage/catalog-model';
|
|
36
35
|
import 'lodash';
|
|
37
36
|
import '@material-ui/icons/Settings';
|
|
38
37
|
import '@material-ui/icons/Share';
|
|
@@ -47,38 +46,6 @@ const techdocsApiRef = createApiRef({
|
|
|
47
46
|
id: "plugin.techdocs.service"
|
|
48
47
|
});
|
|
49
48
|
|
|
50
|
-
const DocsCardGrid = (props) => {
|
|
51
|
-
const { entities } = props;
|
|
52
|
-
const getRouteToReaderPageFor = useRouteRef(rootDocsRouteRef);
|
|
53
|
-
const config = useApi(configApiRef);
|
|
54
|
-
if (!entities)
|
|
55
|
-
return null;
|
|
56
|
-
return /* @__PURE__ */ React.createElement(ItemCardGrid, { "data-testid": "docs-explore" }, !(entities == null ? void 0 : entities.length) ? null : entities.map((entity, index) => {
|
|
57
|
-
var _a, _b;
|
|
58
|
-
return /* @__PURE__ */ React.createElement(Card, { key: index }, /* @__PURE__ */ React.createElement(CardMedia, null, /* @__PURE__ */ React.createElement(
|
|
59
|
-
ItemCardHeader,
|
|
60
|
-
{
|
|
61
|
-
title: (_a = entity.metadata.title) != null ? _a : entity.metadata.name
|
|
62
|
-
}
|
|
63
|
-
)), /* @__PURE__ */ React.createElement(CardContent, null, entity.metadata.description), /* @__PURE__ */ React.createElement(CardActions, null, /* @__PURE__ */ React.createElement(
|
|
64
|
-
LinkButton,
|
|
65
|
-
{
|
|
66
|
-
to: getRouteToReaderPageFor({
|
|
67
|
-
namespace: toLowerMaybe(
|
|
68
|
-
(_b = entity.metadata.namespace) != null ? _b : "default",
|
|
69
|
-
config
|
|
70
|
-
),
|
|
71
|
-
kind: toLowerMaybe(entity.kind, config),
|
|
72
|
-
name: toLowerMaybe(entity.metadata.name, config)
|
|
73
|
-
}),
|
|
74
|
-
color: "primary",
|
|
75
|
-
"data-testid": "read_docs"
|
|
76
|
-
},
|
|
77
|
-
"Read Docs"
|
|
78
|
-
)));
|
|
79
|
-
}));
|
|
80
|
-
};
|
|
81
|
-
|
|
82
49
|
const allEntitiesGroup = {
|
|
83
50
|
title: "All Documentation",
|
|
84
51
|
filterPredicate: () => true
|
|
@@ -139,154 +106,5 @@ const EntityListDocsGrid = (props) => {
|
|
|
139
106
|
)));
|
|
140
107
|
};
|
|
141
108
|
|
|
142
|
-
|
|
143
|
-
id: "techdocs",
|
|
144
|
-
apis: [
|
|
145
|
-
createApiFactory({
|
|
146
|
-
api: techdocsStorageApiRef$1,
|
|
147
|
-
deps: {
|
|
148
|
-
configApi: configApiRef,
|
|
149
|
-
discoveryApi: discoveryApiRef,
|
|
150
|
-
identityApi: identityApiRef,
|
|
151
|
-
fetchApi: fetchApiRef
|
|
152
|
-
},
|
|
153
|
-
factory: ({ configApi, discoveryApi, identityApi, fetchApi }) => new TechDocsStorageClient({
|
|
154
|
-
configApi,
|
|
155
|
-
discoveryApi,
|
|
156
|
-
identityApi,
|
|
157
|
-
fetchApi
|
|
158
|
-
})
|
|
159
|
-
}),
|
|
160
|
-
createApiFactory({
|
|
161
|
-
api: techdocsApiRef$1,
|
|
162
|
-
deps: {
|
|
163
|
-
configApi: configApiRef,
|
|
164
|
-
discoveryApi: discoveryApiRef,
|
|
165
|
-
fetchApi: fetchApiRef
|
|
166
|
-
},
|
|
167
|
-
factory: ({ configApi, discoveryApi, fetchApi }) => new TechDocsClient({
|
|
168
|
-
configApi,
|
|
169
|
-
discoveryApi,
|
|
170
|
-
fetchApi
|
|
171
|
-
})
|
|
172
|
-
})
|
|
173
|
-
],
|
|
174
|
-
routes: {
|
|
175
|
-
root: rootRouteRef,
|
|
176
|
-
docRoot: rootDocsRouteRef,
|
|
177
|
-
entityContent: rootCatalogDocsRouteRef
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
const TechdocsPage = techdocsPlugin.provide(
|
|
181
|
-
createRoutableExtension({
|
|
182
|
-
name: "TechdocsPage",
|
|
183
|
-
component: () => Promise.resolve().then(function () { return Router$1; }).then((m) => m.Router),
|
|
184
|
-
mountPoint: rootRouteRef
|
|
185
|
-
})
|
|
186
|
-
);
|
|
187
|
-
const EntityTechdocsContent = techdocsPlugin.provide(
|
|
188
|
-
createRoutableExtension({
|
|
189
|
-
name: "EntityTechdocsContent",
|
|
190
|
-
component: () => Promise.resolve().then(function () { return Router$1; }).then((m) => m.EmbeddedDocsRouter),
|
|
191
|
-
mountPoint: rootCatalogDocsRouteRef
|
|
192
|
-
})
|
|
193
|
-
);
|
|
194
|
-
const TechDocsCustomHome = techdocsPlugin.provide(
|
|
195
|
-
createRoutableExtension({
|
|
196
|
-
name: "TechDocsCustomHome",
|
|
197
|
-
component: () => import('./esm/TechDocsCustomHome-63a41580.esm.js').then(
|
|
198
|
-
(m) => m.TechDocsCustomHome
|
|
199
|
-
),
|
|
200
|
-
mountPoint: rootRouteRef
|
|
201
|
-
})
|
|
202
|
-
);
|
|
203
|
-
const TechDocsIndexPage = techdocsPlugin.provide(
|
|
204
|
-
createRoutableExtension({
|
|
205
|
-
name: "TechDocsIndexPage",
|
|
206
|
-
component: () => import('./esm/TechDocsIndexPage-f0a2b203.esm.js').then(function (n) { return n.d; }).then(
|
|
207
|
-
(m) => m.TechDocsIndexPage
|
|
208
|
-
),
|
|
209
|
-
mountPoint: rootRouteRef
|
|
210
|
-
})
|
|
211
|
-
);
|
|
212
|
-
const TechDocsReaderPage = techdocsPlugin.provide(
|
|
213
|
-
createRoutableExtension({
|
|
214
|
-
name: "TechDocsReaderPage",
|
|
215
|
-
component: () => import('./esm/index-a1239e83.esm.js').then(
|
|
216
|
-
(m) => m.TechDocsReaderPage
|
|
217
|
-
),
|
|
218
|
-
mountPoint: rootDocsRouteRef
|
|
219
|
-
})
|
|
220
|
-
);
|
|
221
|
-
const TechDocsSearchResultListItem = techdocsPlugin.provide(
|
|
222
|
-
createSearchResultListItemExtension({
|
|
223
|
-
name: "TechDocsSearchResultListItem",
|
|
224
|
-
component: () => import('./esm/TechDocsSearchResultListItem-4736f829.esm.js').then(
|
|
225
|
-
(m) => m.TechDocsSearchResultListItem
|
|
226
|
-
),
|
|
227
|
-
predicate: (result) => result.type === "techdocs"
|
|
228
|
-
})
|
|
229
|
-
);
|
|
230
|
-
|
|
231
|
-
const TECHDOCS_EXTERNAL_ANNOTATION$1 = "backstage.io/techdocs-entity";
|
|
232
|
-
const EntityPageDocs = ({ entity }) => {
|
|
233
|
-
var _a, _b;
|
|
234
|
-
let entityRef = getCompoundEntityRef(entity);
|
|
235
|
-
if ((_a = entity.metadata.annotations) == null ? void 0 : _a[TECHDOCS_EXTERNAL_ANNOTATION$1]) {
|
|
236
|
-
try {
|
|
237
|
-
entityRef = parseEntityRef(
|
|
238
|
-
(_b = entity.metadata.annotations) == null ? void 0 : _b[TECHDOCS_EXTERNAL_ANNOTATION$1]
|
|
239
|
-
);
|
|
240
|
-
} catch {
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
return /* @__PURE__ */ React.createElement(TechDocsReaderPage, { entityRef }, /* @__PURE__ */ React.createElement(TechDocsReaderPageSubheader, null), /* @__PURE__ */ React.createElement(TechDocsReaderPageContent, { withSearch: false }));
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
const TECHDOCS_ANNOTATION = "backstage.io/techdocs-ref";
|
|
247
|
-
const TECHDOCS_EXTERNAL_ANNOTATION = "backstage.io/techdocs-entity";
|
|
248
|
-
const isTechDocsAvailable = (entity) => {
|
|
249
|
-
var _a, _b, _c, _d;
|
|
250
|
-
return Boolean((_b = (_a = entity == null ? void 0 : entity.metadata) == null ? void 0 : _a.annotations) == null ? void 0 : _b[TECHDOCS_ANNOTATION]) || Boolean((_d = (_c = entity == null ? void 0 : entity.metadata) == null ? void 0 : _c.annotations) == null ? void 0 : _d[TECHDOCS_EXTERNAL_ANNOTATION]);
|
|
251
|
-
};
|
|
252
|
-
const Router = () => {
|
|
253
|
-
return /* @__PURE__ */ React.createElement(Routes, null, /* @__PURE__ */ React.createElement(Route, { path: "/", element: /* @__PURE__ */ React.createElement(TechDocsIndexPage$1, null) }), /* @__PURE__ */ React.createElement(
|
|
254
|
-
Route,
|
|
255
|
-
{
|
|
256
|
-
path: "/:namespace/:kind/:name/*",
|
|
257
|
-
element: /* @__PURE__ */ React.createElement(TechDocsReaderPage$1, null)
|
|
258
|
-
}
|
|
259
|
-
));
|
|
260
|
-
};
|
|
261
|
-
const EmbeddedDocsRouter = (props) => {
|
|
262
|
-
var _a, _b;
|
|
263
|
-
const { children } = props;
|
|
264
|
-
const { entity } = useEntity();
|
|
265
|
-
const element = useRoutes([
|
|
266
|
-
{
|
|
267
|
-
path: "/*",
|
|
268
|
-
element: /* @__PURE__ */ React.createElement(EntityPageDocs, { entity }),
|
|
269
|
-
children: [
|
|
270
|
-
{
|
|
271
|
-
path: "*",
|
|
272
|
-
element: children
|
|
273
|
-
}
|
|
274
|
-
]
|
|
275
|
-
}
|
|
276
|
-
]);
|
|
277
|
-
const projectId = ((_a = entity.metadata.annotations) == null ? void 0 : _a[TECHDOCS_ANNOTATION]) || ((_b = entity.metadata.annotations) == null ? void 0 : _b[TECHDOCS_EXTERNAL_ANNOTATION]);
|
|
278
|
-
if (!projectId) {
|
|
279
|
-
return /* @__PURE__ */ React.createElement(MissingAnnotationEmptyState, { annotation: [TECHDOCS_ANNOTATION] });
|
|
280
|
-
}
|
|
281
|
-
return element;
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
var Router$1 = /*#__PURE__*/Object.freeze({
|
|
285
|
-
__proto__: null,
|
|
286
|
-
isTechDocsAvailable: isTechDocsAvailable,
|
|
287
|
-
Router: Router,
|
|
288
|
-
EmbeddedDocsRouter: EmbeddedDocsRouter
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
export { DocsCardGrid, EmbeddedDocsRouter, EntityListDocsGrid, EntityTechdocsContent, Router, TechDocsCustomHome, TechDocsIndexPage, TechDocsReaderPage, TechDocsSearchResultListItem, TechdocsPage, isTechDocsAvailable, techdocsPlugin as plugin, techdocsApiRef, techdocsPlugin, techdocsStorageApiRef };
|
|
109
|
+
export { EntityListDocsGrid, techdocsApiRef, techdocsStorageApiRef };
|
|
292
110
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/api.ts","../src/home/components/Grids/DocsCardGrid.tsx","../src/home/components/Grids/EntityListDocsGrid.tsx","../src/plugin.ts","../src/EntityPageDocs.tsx","../src/Router.tsx"],"sourcesContent":["/*\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 { CompoundEntityRef } from '@backstage/catalog-model';\nimport {\n TechDocsEntityMetadata,\n TechDocsMetadata,\n} from '@backstage/plugin-techdocs-react';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/**\n * Utility API reference for the {@link TechDocsStorageApi}.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport const techdocsStorageApiRef = createApiRef<TechDocsStorageApi>({\n id: 'plugin.techdocs.storageservice',\n});\n\n/**\n * Utility API reference for the {@link TechDocsApi}.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport const techdocsApiRef = createApiRef<TechDocsApi>({\n id: 'plugin.techdocs.service',\n});\n\n/**\n * The outcome of a docs sync operation.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport type SyncResult = 'cached' | 'updated';\n\n/**\n * API which talks to TechDocs storage to fetch files to render.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport interface TechDocsStorageApi {\n getApiOrigin(): Promise<string>;\n getStorageUrl(): Promise<string>;\n getBuilder(): Promise<string>;\n getEntityDocs(entityId: CompoundEntityRef, path: string): Promise<string>;\n syncEntityDocs(\n entityId: CompoundEntityRef,\n logHandler?: (line: string) => void,\n ): Promise<SyncResult>;\n getBaseUrl(\n oldBaseUrl: string,\n entityId: CompoundEntityRef,\n path: string,\n ): Promise<string>;\n}\n\n/**\n * API to talk to techdocs-backend.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport interface TechDocsApi {\n getApiOrigin(): Promise<string>;\n getTechDocsMetadata(entityId: CompoundEntityRef): Promise<TechDocsMetadata>;\n getEntityMetadata(\n entityId: CompoundEntityRef,\n ): Promise<TechDocsEntityMetadata>;\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 { rootDocsRouteRef } from '../../../routes';\nimport { toLowerMaybe } from '../../../helpers';\nimport { Entity } from '@backstage/catalog-model';\nimport { useApi, useRouteRef, configApiRef } from '@backstage/core-plugin-api';\nimport {\n LinkButton,\n ItemCardGrid,\n ItemCardHeader,\n} from '@backstage/core-components';\nimport { Card, CardActions, CardContent, CardMedia } from '@material-ui/core';\nimport React from 'react';\n\n/**\n * Props for {@link DocsCardGrid}\n *\n * @public\n */\nexport type DocsCardGridProps = {\n entities: Entity[] | undefined;\n};\n\n/**\n * Component which accepts a list of entities and renders a item card for each entity\n *\n * @public\n */\nexport const DocsCardGrid = (props: DocsCardGridProps) => {\n const { entities } = props;\n const getRouteToReaderPageFor = useRouteRef(rootDocsRouteRef);\n const config = useApi(configApiRef);\n if (!entities) return null;\n return (\n <ItemCardGrid data-testid=\"docs-explore\">\n {!entities?.length\n ? null\n : entities.map((entity, index: number) => (\n <Card key={index}>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n />\n </CardMedia>\n <CardContent>{entity.metadata.description}</CardContent>\n <CardActions>\n <LinkButton\n to={getRouteToReaderPageFor({\n namespace: toLowerMaybe(\n entity.metadata.namespace ?? 'default',\n config,\n ),\n kind: toLowerMaybe(entity.kind, config),\n name: toLowerMaybe(entity.metadata.name, config),\n })}\n color=\"primary\"\n data-testid=\"read_docs\"\n >\n Read Docs\n </LinkButton>\n </CardActions>\n </Card>\n ))}\n </ItemCardGrid>\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 { DocsCardGrid } from './DocsCardGrid';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n CodeSnippet,\n Content,\n ContentHeader,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\nimport {\n useEntityList,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Typography } from '@material-ui/core';\nimport React from 'react';\n\n/**\n * Props for {@link EntityListDocsGrid}\n *\n * @public\n */\nexport type DocsGroupConfig = {\n title: React.ReactNode;\n filterPredicate: ((entity: Entity) => boolean) | string;\n};\n\n/**\n * Props for {@link EntityListDocsGrid}\n *\n * @public\n */\nexport type EntityListDocsGridPageProps = {\n groups?: DocsGroupConfig[];\n};\n\nconst allEntitiesGroup: DocsGroupConfig = {\n title: 'All Documentation',\n filterPredicate: () => true,\n};\n\nconst EntityListDocsGridGroup = (props: {\n group: DocsGroupConfig;\n entities: Entity[];\n}) => {\n const { entities, group } = props;\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const shownEntities = entities.filter(entity => {\n if (group.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof group.filterPredicate === 'function' &&\n group.filterPredicate(entity)\n );\n });\n\n const titleComponent: React.ReactNode = (() => {\n return typeof group.title === 'string' ? (\n <ContentHeader title={group.title} />\n ) : (\n group.title\n );\n })();\n\n if (shownEntities.length === 0) {\n return null;\n }\n\n return (\n <Content>\n {titleComponent}\n <DocsCardGrid entities={shownEntities} />\n </Content>\n );\n};\n\n/**\n * Component responsible to get entities from entity list context and pass down to DocsCardGrid\n *\n * @public\n */\nexport const EntityListDocsGrid = (props: EntityListDocsGridPageProps) => {\n const { loading, error, entities } = useEntityList();\n\n if (error) {\n return (\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n );\n }\n\n if (loading) {\n return <Progress />;\n }\n\n if (entities.length === 0) {\n return (\n <div data-testid=\"doc-not-found\">\n <Typography variant=\"body2\">\n No documentation found that match your filter. Learn more about{' '}\n <Link to=\"https://backstage.io/docs/features/techdocs/creating-and-publishing\">\n publishing documentation\n </Link>\n .\n </Typography>\n </div>\n );\n }\n\n entities.sort((a, b) =>\n (a.metadata.title ?? a.metadata.name).localeCompare(\n b.metadata.title ?? b.metadata.name,\n ),\n );\n\n return (\n <Content>\n {(props.groups || [allEntitiesGroup]).map((group, index: number) => (\n <EntityListDocsGridGroup\n entities={entities}\n group={group}\n key={`${group.title}-${index}`}\n />\n ))}\n </Content>\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 {\n techdocsApiRef,\n techdocsStorageApiRef,\n} from '@backstage/plugin-techdocs-react';\nimport { TechDocsClient, TechDocsStorageClient } from './client';\nimport {\n rootDocsRouteRef,\n rootRouteRef,\n rootCatalogDocsRouteRef,\n} from './routes';\nimport {\n configApiRef,\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { TechDocsSearchResultListItemProps } from './search/components/TechDocsSearchResultListItem';\n\n/**\n * The Backstage plugin that renders technical documentation for your components\n *\n * @public\n */\nexport const techdocsPlugin = createPlugin({\n id: 'techdocs',\n apis: [\n createApiFactory({\n api: techdocsStorageApiRef,\n deps: {\n configApi: configApiRef,\n discoveryApi: discoveryApiRef,\n identityApi: identityApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, discoveryApi, identityApi, fetchApi }) =>\n new TechDocsStorageClient({\n configApi,\n discoveryApi,\n identityApi,\n fetchApi,\n }),\n }),\n createApiFactory({\n api: techdocsApiRef,\n deps: {\n configApi: configApiRef,\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, discoveryApi, fetchApi }) =>\n new TechDocsClient({\n configApi,\n discoveryApi,\n fetchApi,\n }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n docRoot: rootDocsRouteRef,\n entityContent: rootCatalogDocsRouteRef,\n },\n});\n\n/**\n * Routable extension used to render docs\n *\n * @public\n */\nexport const TechdocsPage = techdocsPlugin.provide(\n createRoutableExtension({\n name: 'TechdocsPage',\n component: () => import('./Router').then(m => m.Router),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * Routable extension used to render docs on Entity page\n *\n * @public\n */\nexport const EntityTechdocsContent = techdocsPlugin.provide(\n createRoutableExtension({\n name: 'EntityTechdocsContent',\n component: () => import('./Router').then(m => m.EmbeddedDocsRouter),\n mountPoint: rootCatalogDocsRouteRef,\n }),\n);\n\n/**\n * Component which takes a custom tabs config object and renders a documentation landing page.\n *\n * @public\n */\nexport const TechDocsCustomHome = techdocsPlugin.provide(\n createRoutableExtension({\n name: 'TechDocsCustomHome',\n component: () =>\n import('./home/components/TechDocsCustomHome').then(\n m => m.TechDocsCustomHome,\n ),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * Responsible for rendering the provided router element\n *\n * @public\n */\nexport const TechDocsIndexPage = techdocsPlugin.provide(\n createRoutableExtension({\n name: 'TechDocsIndexPage',\n component: () =>\n import('./home/components/TechDocsIndexPage').then(\n m => m.TechDocsIndexPage,\n ),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * Component responsible for composing a TechDocs reader page experience\n *\n * @public\n */\nexport const TechDocsReaderPage = techdocsPlugin.provide(\n createRoutableExtension({\n name: 'TechDocsReaderPage',\n component: () =>\n import('./reader/components/TechDocsReaderPage').then(\n m => m.TechDocsReaderPage,\n ),\n mountPoint: rootDocsRouteRef,\n }),\n);\n\n/**\n * React extension used to render results on Search page or modal\n *\n * @public\n */\nexport const TechDocsSearchResultListItem: (\n props: SearchResultListItemExtensionProps<TechDocsSearchResultListItemProps>,\n) => JSX.Element | null = techdocsPlugin.provide(\n createSearchResultListItemExtension({\n name: 'TechDocsSearchResultListItem',\n component: () =>\n import('./search/components/TechDocsSearchResultListItem').then(\n m => m.TechDocsSearchResultListItem,\n ),\n predicate: result => result.type === 'techdocs',\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 {\n Entity,\n getCompoundEntityRef,\n parseEntityRef,\n} from '@backstage/catalog-model';\n\nimport React from 'react';\nimport { TechDocsReaderPage } from './plugin';\nimport { TechDocsReaderPageContent } from './reader/components/TechDocsReaderPageContent';\nimport { TechDocsReaderPageSubheader } from './reader/components/TechDocsReaderPageSubheader';\n\nconst TECHDOCS_EXTERNAL_ANNOTATION = 'backstage.io/techdocs-entity';\n\ntype EntityPageDocsProps = { entity: Entity };\n\nexport const EntityPageDocs = ({ entity }: EntityPageDocsProps) => {\n let entityRef = getCompoundEntityRef(entity);\n\n if (entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) {\n try {\n entityRef = parseEntityRef(\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION],\n );\n } catch {\n // not a fan of this but we don't care if the parseEntityRef fails\n }\n }\n\n return (\n <TechDocsReaderPage entityRef={entityRef}>\n <TechDocsReaderPageSubheader />\n <TechDocsReaderPageContent withSearch={false} />\n </TechDocsReaderPage>\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 React, { PropsWithChildren } from 'react';\nimport { Route, Routes, useRoutes } from 'react-router-dom';\n\nimport { Entity } from '@backstage/catalog-model';\nimport { EntityPageDocs } from './EntityPageDocs';\nimport { MissingAnnotationEmptyState } from '@backstage/core-components';\nimport { TechDocsIndexPage } from './home/components/TechDocsIndexPage';\nimport { TechDocsReaderPage } from './reader/components/TechDocsReaderPage';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nconst TECHDOCS_ANNOTATION = 'backstage.io/techdocs-ref';\n\nconst TECHDOCS_EXTERNAL_ANNOTATION = 'backstage.io/techdocs-entity';\n\n/**\n * Helper that takes in entity and returns true/false if TechDocs is available for the entity\n *\n * @public\n */\nexport const isTechDocsAvailable = (entity: Entity) =>\n Boolean(entity?.metadata?.annotations?.[TECHDOCS_ANNOTATION]) ||\n Boolean(entity?.metadata?.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]);\n\n/**\n * Responsible for registering routes for TechDocs, TechDocs Homepage and separate TechDocs page\n *\n * @public\n */\nexport const Router = () => {\n return (\n <Routes>\n <Route path=\"/\" element={<TechDocsIndexPage />} />\n <Route\n path=\"/:namespace/:kind/:name/*\"\n element={<TechDocsReaderPage />}\n />\n </Routes>\n );\n};\n\n/**\n * Responsible for registering route to view docs on Entity page\n *\n * @public\n */\nexport const EmbeddedDocsRouter = (props: PropsWithChildren<{}>) => {\n const { children } = props;\n const { entity } = useEntity();\n\n // Using objects instead of <Route> elements, otherwise \"outlet\" will be null on sub-pages and add-ons won't render\n const element = useRoutes([\n {\n path: '/*',\n element: <EntityPageDocs entity={entity} />,\n children: [\n {\n path: '*',\n element: children,\n },\n ],\n },\n ]);\n\n const projectId =\n entity.metadata.annotations?.[TECHDOCS_ANNOTATION] ||\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION];\n\n if (!projectId) {\n return <MissingAnnotationEmptyState annotation={[TECHDOCS_ANNOTATION]} />;\n }\n\n return element;\n};\n"],"names":["techdocsStorageApiRef","techdocsApiRef","TECHDOCS_EXTERNAL_ANNOTATION","TechDocsIndexPage","TechDocsReaderPage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,MAAM,wBAAwB,YAAiC,CAAA;AAAA,EACpE,EAAI,EAAA,gCAAA;AACN,CAAC,EAAA;AAQM,MAAM,iBAAiB,YAA0B,CAAA;AAAA,EACtD,EAAI,EAAA,yBAAA;AACN,CAAC;;ACCY,MAAA,YAAA,GAAe,CAAC,KAA6B,KAAA;AACxD,EAAM,MAAA,EAAE,UAAa,GAAA,KAAA,CAAA;AACrB,EAAM,MAAA,uBAAA,GAA0B,YAAY,gBAAgB,CAAA,CAAA;AAC5D,EAAM,MAAA,MAAA,GAAS,OAAO,YAAY,CAAA,CAAA;AAClC,EAAA,IAAI,CAAC,QAAA;AAAU,IAAO,OAAA,IAAA,CAAA;AACtB,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,EAAa,aAAY,EAAA,cAAA,EAAA,EACvB,EAAC,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAU,MACR,CAAA,GAAA,IAAA,GACA,QAAS,CAAA,GAAA,CAAI,CAAC,MAAA,EAAQ,KAAe,KAAA;AAnD/C,IAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAoDY,IAAA,uBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,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OAAS,EAAA,QAAA;AAAA,SACX;AAAA,OACF;AAAA,KACF;AAAA,GACD,CAAA,CAAA;AAED,EAAM,MAAA,SAAA,GAAA,CAAA,CACJ,YAAO,QAAS,CAAA,WAAA,KAAhB,mBAA8B,mBAC9B,CAAA,MAAA,CAAA,EAAA,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,KAAhB,IAA8B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,4BAAA,CAAA,CAAA,CAAA;AAEhC,EAAA,IAAI,CAAC,SAAW,EAAA;AACd,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,2BAAA,EAAA,EAA4B,UAAY,EAAA,CAAC,mBAAmB,CAAG,EAAA,CAAA,CAAA;AAAA,GACzE;AAEA,EAAO,OAAA,OAAA,CAAA;AACT;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/api.ts","../src/home/components/Grids/EntityListDocsGrid.tsx"],"sourcesContent":["/*\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 { CompoundEntityRef } from '@backstage/catalog-model';\nimport {\n TechDocsEntityMetadata,\n TechDocsMetadata,\n} from '@backstage/plugin-techdocs-react';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\n/**\n * Utility API reference for the {@link TechDocsStorageApi}.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport const techdocsStorageApiRef = createApiRef<TechDocsStorageApi>({\n id: 'plugin.techdocs.storageservice',\n});\n\n/**\n * Utility API reference for the {@link TechDocsApi}.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport const techdocsApiRef = createApiRef<TechDocsApi>({\n id: 'plugin.techdocs.service',\n});\n\n/**\n * The outcome of a docs sync operation.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport type SyncResult = 'cached' | 'updated';\n\n/**\n * API which talks to TechDocs storage to fetch files to render.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport interface TechDocsStorageApi {\n getApiOrigin(): Promise<string>;\n getStorageUrl(): Promise<string>;\n getBuilder(): Promise<string>;\n getEntityDocs(entityId: CompoundEntityRef, path: string): Promise<string>;\n syncEntityDocs(\n entityId: CompoundEntityRef,\n logHandler?: (line: string) => void,\n ): Promise<SyncResult>;\n getBaseUrl(\n oldBaseUrl: string,\n entityId: CompoundEntityRef,\n path: string,\n ): Promise<string>;\n}\n\n/**\n * API to talk to techdocs-backend.\n *\n * @public\n * @deprecated Import from `@backstage/plugin-techdocs-react` instead\n */\nexport interface TechDocsApi {\n getApiOrigin(): Promise<string>;\n getTechDocsMetadata(entityId: CompoundEntityRef): Promise<TechDocsMetadata>;\n getEntityMetadata(\n entityId: CompoundEntityRef,\n ): Promise<TechDocsEntityMetadata>;\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 { DocsCardGrid } from './DocsCardGrid';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n CodeSnippet,\n Content,\n ContentHeader,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\nimport {\n useEntityList,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Typography } from '@material-ui/core';\nimport React from 'react';\n\n/**\n * Props for {@link EntityListDocsGrid}\n *\n * @public\n */\nexport type DocsGroupConfig = {\n title: React.ReactNode;\n filterPredicate: ((entity: Entity) => boolean) | string;\n};\n\n/**\n * Props for {@link EntityListDocsGrid}\n *\n * @public\n */\nexport type EntityListDocsGridPageProps = {\n groups?: DocsGroupConfig[];\n};\n\nconst allEntitiesGroup: DocsGroupConfig = {\n title: 'All Documentation',\n filterPredicate: () => true,\n};\n\nconst EntityListDocsGridGroup = (props: {\n group: DocsGroupConfig;\n entities: Entity[];\n}) => {\n const { entities, group } = props;\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const shownEntities = entities.filter(entity => {\n if (group.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof group.filterPredicate === 'function' &&\n group.filterPredicate(entity)\n );\n });\n\n const titleComponent: React.ReactNode = (() => {\n return typeof group.title === 'string' ? (\n <ContentHeader title={group.title} />\n ) : (\n group.title\n );\n })();\n\n if (shownEntities.length === 0) {\n return null;\n }\n\n return (\n <Content>\n {titleComponent}\n <DocsCardGrid entities={shownEntities} />\n </Content>\n );\n};\n\n/**\n * Component responsible to get entities from entity list context and pass down to DocsCardGrid\n *\n * @public\n */\nexport const EntityListDocsGrid = (props: EntityListDocsGridPageProps) => {\n const { loading, error, entities } = useEntityList();\n\n if (error) {\n return (\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n );\n }\n\n if (loading) {\n return <Progress />;\n }\n\n if (entities.length === 0) {\n return (\n <div data-testid=\"doc-not-found\">\n <Typography variant=\"body2\">\n No documentation found that match your filter. Learn more about{' '}\n <Link to=\"https://backstage.io/docs/features/techdocs/creating-and-publishing\">\n publishing documentation\n </Link>\n .\n </Typography>\n </div>\n );\n }\n\n entities.sort((a, b) =>\n (a.metadata.title ?? a.metadata.name).localeCompare(\n b.metadata.title ?? b.metadata.name,\n ),\n );\n\n return (\n <Content>\n {(props.groups || [allEntitiesGroup]).map((group, index: number) => (\n <EntityListDocsGridGroup\n entities={entities}\n group={group}\n key={`${group.title}-${index}`}\n />\n ))}\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,MAAM,wBAAwB,YAAiC,CAAA;AAAA,EACpE,EAAI,EAAA,gCAAA;AACN,CAAC,EAAA;AAQM,MAAM,iBAAiB,YAA0B,CAAA;AAAA,EACtD,EAAI,EAAA,yBAAA;AACN,CAAC;;ACWD,MAAM,gBAAoC,GAAA;AAAA,EACxC,KAAO,EAAA,mBAAA;AAAA,EACP,iBAAiB,MAAM,IAAA;AACzB,CAAA,CAAA;AAEA,MAAM,uBAAA,GAA0B,CAAC,KAG3B,KAAA;AACJ,EAAM,MAAA,EAAE,QAAU,EAAA,KAAA,EAAU,GAAA,KAAA,CAAA;AAC5B,EAAA,MAAM,EAAE,OAAA,EAAS,gBAAkB,EAAA,aAAA,KAAkB,kBAAmB,EAAA,CAAA;AAExE,EAAM,MAAA,aAAA,GAAgB,QAAS,CAAA,MAAA,CAAO,CAAU,MAAA,KAAA;AAC9C,IAAI,IAAA,KAAA,CAAM,oBAAoB,aAAe,EAAA;AAC3C,MAAA,IAAI,gBAAkB,EAAA;AACpB,QAAO,OAAA,KAAA,CAAA;AAAA,OACT;AACA,MAAA,OAAO,cAAc,MAAM,CAAA,CAAA;AAAA,KAC7B;AAEA,IAAA,OACE,OAAO,KAAM,CAAA,eAAA,KAAoB,UACjC,IAAA,KAAA,CAAM,gBAAgB,MAAM,CAAA,CAAA;AAAA,GAE/B,CAAA,CAAA;AAED,EAAA,MAAM,kBAAmC,MAAM;AAC7C,IAAO,OAAA,OAAO,KAAM,CAAA,KAAA,KAAU,QAC5B,mBAAA,KAAA,CAAA,aAAA,CAAC,iBAAc,K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K,MAAA,OAAA,CAAA,CAAA,EAAA,GAAA,CAAA,CAAE,QAAS,CAAA,KAAA,KAAX,IAAoB,GAAA,EAAA,GAAA,CAAA,CAAE,SAAS,IAAM,EAAA,aAAA;AAAA,QAAA,CACpC,EAAE,GAAA,CAAA,CAAA,QAAA,CAAS,KAAX,KAAA,IAAA,GAAA,EAAA,GAAoB,EAAE,QAAS,CAAA,IAAA;AAAA,OACjC,CAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,OACG,EAAA,IAAA,EAAA,CAAA,KAAA,CAAM,MAAU,IAAA,CAAC,gBAAgB,CAAG,EAAA,GAAA,CAAI,CAAC,KAAA,EAAO,KAChD,qBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,uBAAA;AAAA,IAAA;AAAA,MACC,QAAA;AAAA,MACA,KAAA;AAAA,MACA,GAAK,EAAA,CAAA,EAAG,KAAM,CAAA,KAAK,IAAI,KAAK,CAAA,CAAA;AAAA,KAAA;AAAA,GAE/B,CACH,CAAA,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-techdocs",
|
|
3
3
|
"description": "The Backstage plugin that renders technical documentation for your components",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.1-next.1",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@backstage/catalog-model": "^1.4.3",
|
|
49
49
|
"@backstage/config": "^1.1.1",
|
|
50
|
-
"@backstage/core-components": "^0.13.
|
|
51
|
-
"@backstage/core-plugin-api": "^1.
|
|
50
|
+
"@backstage/core-components": "^0.13.8-next.1",
|
|
51
|
+
"@backstage/core-plugin-api": "^1.8.0-next.0",
|
|
52
52
|
"@backstage/errors": "^1.2.3",
|
|
53
|
-
"@backstage/frontend-plugin-api": "^0.
|
|
54
|
-
"@backstage/integration": "^1.7.
|
|
55
|
-
"@backstage/integration-react": "^1.1.
|
|
56
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
53
|
+
"@backstage/frontend-plugin-api": "^0.3.0-next.1",
|
|
54
|
+
"@backstage/integration": "^1.7.2-next.0",
|
|
55
|
+
"@backstage/integration-react": "^1.1.21-next.1",
|
|
56
|
+
"@backstage/plugin-catalog-react": "^1.9.0-next.1",
|
|
57
57
|
"@backstage/plugin-search-common": "^1.2.7",
|
|
58
|
-
"@backstage/plugin-search-react": "^1.7.1",
|
|
59
|
-
"@backstage/plugin-techdocs-react": "^1.1.
|
|
60
|
-
"@backstage/theme": "^0.4.
|
|
58
|
+
"@backstage/plugin-search-react": "^1.7.2-next.1",
|
|
59
|
+
"@backstage/plugin-techdocs-react": "^1.1.13-next.1",
|
|
60
|
+
"@backstage/theme": "^0.4.4-next.0",
|
|
61
61
|
"@material-ui/core": "^4.12.2",
|
|
62
62
|
"@material-ui/icons": "^4.9.1",
|
|
63
63
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -77,15 +77,14 @@
|
|
|
77
77
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@backstage/cli": "^0.
|
|
81
|
-
"@backstage/core-app-api": "^1.11.0",
|
|
82
|
-
"@backstage/dev-utils": "^1.0.
|
|
83
|
-
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.1",
|
|
84
|
-
"@backstage/test-utils": "^1.4.
|
|
80
|
+
"@backstage/cli": "^0.24.0-next.1",
|
|
81
|
+
"@backstage/core-app-api": "^1.11.1-next.0",
|
|
82
|
+
"@backstage/dev-utils": "^1.0.23-next.1",
|
|
83
|
+
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.2-next.1",
|
|
84
|
+
"@backstage/test-utils": "^1.4.5-next.0",
|
|
85
85
|
"@testing-library/dom": "^9.0.0",
|
|
86
86
|
"@testing-library/jest-dom": "^6.0.0",
|
|
87
|
-
"@testing-library/react": "^
|
|
88
|
-
"@testing-library/react-hooks": "^8.0.0",
|
|
87
|
+
"@testing-library/react": "^14.0.0",
|
|
89
88
|
"@testing-library/user-event": "^14.0.0",
|
|
90
89
|
"@types/dompurify": "^2.2.2",
|
|
91
90
|
"@types/event-source-polyfill": "^1.0.0",
|